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

Conversation

reisborw
Copy link
Owner

@reisborw reisborw commented Nov 28, 2019

User's name now is displayed on the front-end, instead of the user id

reisborw added 3 commits Nov 28, 2019
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
The getAnswersByQuestion method wasn't fully tested. It was missing bad data tests. It is now 100% tested
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 reisborw merged commit c064f2a into master Nov 28, 2019
@reisborw reisborw deleted the fix-showUserNameOnAnswers branch Nov 28, 2019
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant