Skip to content

Race condition check: new volunteers system spec#6745

Open
stefannibrasil wants to merge 6 commits intorubyforgood:mainfrom
hexdevs:sb-volunteers-system-spec-6698
Open

Race condition check: new volunteers system spec#6745
stefannibrasil wants to merge 6 commits intorubyforgood:mainfrom
hexdevs:sb-volunteers-system-spec-6698

Conversation

@stefannibrasil
Copy link
Contributor

@stefannibrasil stefannibrasil commented Mar 5, 2026

What github issue is this PR for, if any?

Related #6698

What changed, and why?

  • refactors test checks for what the user sees in the page to avoid hitting the database
  • moves email invitation test to a model test. The system test was not checking for anything on the page. This test is better placed at the model level, since it's related to business logic.
  • reorganizes volunteer test under the same context
  • defaults to building an organization factory instead of creating, which is usually slower

How is this tested? (please write rspec and jest tests!) 💖💪

Everything is a test ⭐

It avoids hitting the Database when running system tests
Keep volunteer tests in the same context, and have
each test creating its own required setup.
The system test was not checking for anything on the page.
This test is better placed at the model level, since
it's related to business logic.
Since we're not checking for anything related to
an organization, we can speed this test by building
factories instead of creating them.
@github-actions github-actions bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Mar 5, 2026
@stefannibrasil stefannibrasil marked this pull request as ready for review March 5, 2026 00:34
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.

1 participant