Skip to content

[Resolves #6692] Added tests for EmancipationsController#6824

Merged
compwron merged 2 commits into
rubyforgood:mainfrom
likevi54:main
Apr 5, 2026
Merged

[Resolves #6692] Added tests for EmancipationsController#6824
compwron merged 2 commits into
rubyforgood:mainfrom
likevi54:main

Conversation

@likevi54
Copy link
Copy Markdown
Contributor

@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)

compwron
compwron previously approved these changes Apr 3, 2026
Copy link
Copy Markdown
Collaborator

@compwron compwron left a comment

Choose a reason for hiding this comment

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

lgtm! has a lint failure, please fix and we can merge :)

Copy link
Copy Markdown
Collaborator

@compwron compwron left a comment

Choose a reason for hiding this comment

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

:)

@compwron compwron merged commit f939d40 into rubyforgood:main Apr 5, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ruby Touches Ruby code 🧪 Tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test Suite Overhaul

2 participants