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

Add Unit and Integration Tests for Food #21

Merged
merged 6 commits into from
Oct 10, 2023
Merged

Conversation

PabloBona
Copy link
Owner

@PabloBona PabloBona commented Oct 10, 2023

Description:

This pull request adds unit and integration tests for the food functionality. Each critical component has been meticulously tested to ensure its integrity and proper functionality.

Changes Made:

View Specs:
"View specs focus on ensuring that the foods/index view renders correctly and that expected elements, such as buttons and tables, are present in the HTML output."

Controller Specs:
"Controller specs focus on the index, show, new, create, and destroy actions of the FoodsController. It ensured that HTTP requests were handled correctly, parameters were processed accurately, and redirects were precise."

Model Specs:
"Model specs focused on the validation methods of the Food model, ensuring that constraints and relationships were properly enforced."

Additional Notes:
To run test use:

rspec spec/views/food_view_spec.rb
rspec spec/controllers/foods_controller_spec.rb 
rspec spec/models/food_model_spec.rb

Thank you for reviewing this pull request! 🚀

@PabloBona PabloBona requested a review from AndreaM2429 October 10, 2023 17:11
Copy link
Collaborator

@AndreaM2429 AndreaM2429 left a comment

Choose a reason for hiding this comment

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

Status: Approved 🟢

Hi @PabloBona

Great work on implementing the tests 💯 🥳.

Highlights 🥇

  • Linters running
  • Tests are running
  • Good use of factory_boot
  • Good work implementing the test database

Optional

All the changes with optional tags are not crucial enough to prevent you from getting the approval. Still, we would highly recommend that you consider these changes.

Happy coding! 👏 👏 👏

Feel free to leave any questions or comments in the PR thread if something is not 100% clear. Remember to tag me in your question using @AndreaM2429 so I can receive the notification.

@PabloBona PabloBona merged commit 1919b09 into dev Oct 10, 2023
3 checks passed
@PabloBona PabloBona linked an issue Oct 10, 2023 that may be closed by this pull request
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.

[1pt] Student A - Integration Test - Food list page
2 participants