Skip to content

Commit

Permalink
Merge pull request #1986 from alphagov/move-test-config-to-test-envir…
Browse files Browse the repository at this point in the history
…onment

Move factory_bot_rails config to test environment
  • Loading branch information
robinjam authored Nov 28, 2023
2 parents ba2c717 + 1b244ee commit 9ab3917
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,5 @@ class Application < Rails::Application

# Support for inversing belongs_to -> has_many Active Record associations.
config.active_record.has_many_inversing = false

# See https://github.com/thoughtbot/factory_bot_rails#active-record-configuration
# Required because we define a sequence on Dimensions::Date#date, which is a primary key
config.factory_bot.reject_primary_key_attributes = false
end
end
4 changes: 4 additions & 0 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,8 @@

# Raise error when a before_action's only/except options reference missing actions
config.action_controller.raise_on_missing_callback_actions = true

# See https://github.com/thoughtbot/factory_bot_rails#active-record-configuration
# Required because we define a sequence on Dimensions::Date#date, which is a primary key
config.factory_bot.reject_primary_key_attributes = false
end

0 comments on commit 9ab3917

Please sign in to comment.