Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The factory linting spec is breaking many PR builds lately with this error: FactoryBot::InvalidFactoryError: The following factories are invalid: * global_zone - Validation failed: Name has already been taken (ActiveRecord::RecordInvalid) The problem is likely caused by the fact that the factory `global_zone` can be used only once, as the name is fixed to "Global Zone" and the model has a uniqueness validation on `name`. Still, I don't really understand why the problem happens, as the DB should be clean when this spec example is run. Anyway, the factory now uses the `initialize_with` strategy in order to avoid creating invalid records when the global zone already exists.
- Loading branch information