Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard: Friends #21

Closed
2 tasks done
Miguel-Enrique13 opened this issue Oct 5, 2020 · 0 comments · Fixed by #33
Closed
2 tasks done

Dashboard: Friends #21

Miguel-Enrique13 opened this issue Oct 5, 2020 · 0 comments · Fixed by #33

Comments

@Miguel-Enrique13
Copy link
Owner

Miguel-Enrique13 commented Oct 5, 2020

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:

  1. If I have not added any friends there should be a message. "You currently have no friends".

  2. 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.

  1. 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.
  2. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant