Skip to content

[Resolves #6692] Added tests for EmancipationsController#6824

Open
likevi54 wants to merge 1 commit intorubyforgood:mainfrom
likevi54:main
Open

[Resolves #6692] Added tests for EmancipationsController#6824
likevi54 wants to merge 1 commit intorubyforgood:mainfrom
likevi54:main

Conversation

@likevi54
Copy link
Copy Markdown

@likevi54 likevi54 commented Apr 3, 2026

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:

![alt text](https://media.giphy.com/media/1nP7ThJFes5pgXKUNf/giphy.gif)

@github-actions github-actions bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Pull requests that update Ruby code Tests! 🎉💖👏

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test Suite Overhaul

1 participant