Allow FactoryBot to set primary key attributes

We have at least model (Language) which does not use datbase
generated primary keys so we need to be able to set them.

https://github.com/thoughtbot/factory_bot_rails/pull/419
This commit is contained in:
Tom Hughes 2023-11-28 18:25:35 +00:00
parent 447089330a
commit a74f07d507

View file

@ -67,4 +67,7 @@ Rails.application.configure do
# Use the test adapter for ActiveJob during testing. # Use the test adapter for ActiveJob during testing.
config.active_job.queue_adapter = :test config.active_job.queue_adapter = :test
# Allow FactoryBot to set primary key attributes
config.factory_bot.reject_primary_key_attributes = false
end end