[Resolves #6692] Added tests for EmancipationsController#6824
Open
likevi54 wants to merge 1 commit intorubyforgood:mainfrom
Open
[Resolves #6692] Added tests for EmancipationsController#6824likevi54 wants to merge 1 commit intorubyforgood:mainfrom
likevi54 wants to merge 1 commit intorubyforgood:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What github issue is this PR for, if any?
Resolves #6692
What changed, and why?
Added comprehensive tests for EmancipationsController in spec/controllers/emancipations_controller_spec.rb.
This PR adds coverage for 5 action types (ADD_CATEGORY, ADD_OPTION, DELETE_CATEGORY, DELETE_OPTION, SET_OPTION) with success and failure cases for each
How is this tested? (please write rspec and jest tests!) 💖💪
Note: if you see a flake in your test build in github actions, please post in slack #casa "Flaky test: " :) 💪
Note: We love capybara tests! If you are writing both haml/js and ruby, please try to test your work with tests at every level including system tests like https://github.com/rubyforgood/casa/tree/main/spec/system
Added 23 RSpec controller specs in spec/controllers/emancipations_controller_spec.rb covering all action types and edge cases. No JavaScript or UI changes were made so no Jest or system tests were needed.
Screenshots please :)
Run your local server and take a screenshot of your work! Try to include the URL of the page as well as the contents of the page.
This PR only adds test coverage for existing controller functionality. I can provide a screenshot of the results of my new test cases if needed.
Feelings gif (optional)
What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:
