Faker's randomness was causing certain tests to fail randomly. Names would sometimes contain apostrophes (or potentially other symbols) which get encoded as HTML entities that don't match.
Instead of using random Faker names, this uses predictable sequences like "Organization 1", "Organization 2", etc.
I confirmed that emails still encode HTML entities correctly:
- Create an org that has a Rootable Alerts Contact Email
- Create a recurring shift that has a name with an apostrophe
- As a volunteer, pick up the recurring shift
- As that volunteer, schedule an absence that overlaps with one of the
shift occurrences - See the encoded entity in the rails logs (or mailcatcher)
I also configured faker to use the same seed as rspec so we can reproduce faker failures easily.
Faker's randomness was causing certain tests to fail randomly. Names would sometimes contain apostrophes (or potentially other symbols) which get encoded as HTML entities that don't match.
Instead of using random Faker names, this uses predictable sequences like "Organization 1", "Organization 2", etc.
I confirmed that emails still encode HTML entities correctly:
* Create an org that has a Rootable Alerts Contact Email
* Create a recurring shift that has a name with an apostrophe
* As a volunteer, pick up the recurring shift
* As that volunteer, schedule an absence that overlaps with one of the
shift occurrences
* See the encoded entity in the rails logs (or [mailcatcher](https://mailcatcher.me/))
I also configured faker to use the same seed as rspec so we can reproduce faker failures easily.