Skip to content

Fix show user name on answers #33

Merged
merged 3 commits into from Nov 28, 2019
Merged

Fix show user name on answers #33

merged 3 commits into from Nov 28, 2019

Commits on Nov 28, 2019

  1. Showing user's name on answers

    Created a table join in order to access the user's name. Added a testData method in order to access the user over the in memory db.
    TestData creates the users table and adds an user to it, in order for me to have access to it on my unit tests.
    The getAnswersByQuestion method is still fully tested and working. User's name now is displayed on the front-end
    reisborw committed Nov 28, 2019
  2. 100% test coverage

    The getAnswersByQuestion method wasn't fully tested. It was missing bad data tests. It is now 100% tested
    reisborw committed Nov 28, 2019
  3. Getting rid of thrown error on getAnswersByQuestion

    The method would throw an error when the results of the SQL query was empty. However it is possible for a question to have no answers
    Therefore this error was unecessary and would break the application
    reisborw committed Nov 28, 2019