You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an authenticated user,
I see a section for friends,
In this section, there should be a text field to enter a friend's email and a button to "Add Friend"
Scenarios:
If I have not added any friends there should be a message. "You currently have no friends".
If I have added friends, I should see a list of all my friends.
Details: Users should be able to add a friend by their email address, as long as, the friend is a user of our application and exists in our database.
Example:
Bugs Bunny and Lola Bunny are users of our application, but Daffy Duck is not.
When Bugs Bunny enters lola_bunny@gmail.com to add friend it will be successful and Lola should show up as Bugs Bunny's friend.
When Bugs Bunny enters daffy_duck@gmail.com to add friend it should give an error message that the user does not exist.
Tips: You'll want to research self-referential has_many through. Here is a good starting point to understand the concept. You will probably need to do more googling but that's part of the fun ;)
Write a happy path test
Write a sad path test
The text was updated successfully, but these errors were encountered:
As an authenticated user,
I see a section for friends,
In this section, there should be a text field to enter a friend's email and a button to "Add Friend"
Scenarios:
If I have not added any friends there should be a message. "You currently have no friends".
If I have added friends, I should see a list of all my friends.
Details: Users should be able to add a friend by their email address, as long as, the friend is a user of our application and exists in our database.
Example:
Bugs Bunny and Lola Bunny are users of our application, but Daffy Duck is not.
lola_bunny@gmail.com
to add friend it will be successful and Lola should show up as Bugs Bunny's friend.daffy_duck@gmail.com
to add friend it should give an error message that the user does not exist.Tips: You'll want to research self-referential has_many through. Here is a good starting point to understand the concept. You will probably need to do more googling but that's part of the fun ;)
The text was updated successfully, but these errors were encountered: