Skip to content

Create User model tests#6

Open
rmuehe wants to merge 1 commit intomasterfrom
tests
Open

Create User model tests#6
rmuehe wants to merge 1 commit intomasterfrom
tests

Conversation

@rmuehe
Copy link
Collaborator

@rmuehe rmuehe commented Mar 20, 2022

Run the following to see the new tests pass:
bundle exec rspec -fd

This PR is the result of

  1. git clone https://github.com/jimenezmiguela/Help_Find_Back.git
  2. git checkout -b tests
  3. bundle install
  4. yarn install
  5. db:migrate
  6. key creation
  7. file creation: spec/models/user_spec.rb
  8. git add -A
  9. git commit -m "Create User model tests"
  10. git push origin tests

@rmuehe rmuehe linked an issue Mar 20, 2022 that may be closed by this pull request
@mechamanny
Copy link
Collaborator

Great additions! 2 notes:

  • The yarn_integrity file should be added to you .gitignore list, I don't think that this is a file that we need checked into the main source code.

  • In the future, you might want to focus your testing efforts on the developer created logic and the core functionality of the application. Rails does a good job of testing it's methods like validates, presence, and belongs to. The tests included are useful, but not as useful as something that covers the developer created logic. Most of this lives in the controller, since this is an API. Consider adding request specs and it will cover a lot of these test cases for free!

Also, I am going to refrain from approving any PRs, so I would tag one of your classmates to get an approval.

@rmuehe
Copy link
Collaborator Author

rmuehe commented Mar 22, 2022

Agreed.
However, this PR is a test of our ability:

  • to spot issues like unintended additions
  • to communicate
  • to merge

Copy link
Collaborator

@inlibra-cpa inlibra-cpa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ryan left our team, I'm approving his improvements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model Tests

3 participants