Move disabling timestamp check to the spec helper

This commit is contained in:
Gaetan Craig-Riou
2024-01-24 15:56:25 +11:00
parent f4ea71eb3c
commit 048619d660
2 changed files with 3 additions and 6 deletions

View File

@@ -1,6 +0,0 @@
# frozen_string_literal: true
InvisibleCaptcha.setup do |config|
# Disable timestamp check for test environment
config.timestamp_enabled = !Rails.env.test?
end

View File

@@ -55,6 +55,9 @@ I18n.exception_handler = proc do |exception, *_|
raise exception.to_exception
end
# Disable timestamp check for test environment
InvisibleCaptcha.timestamp_enabled = false
RSpec.configure do |config|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
config.fixture_path = "#{Rails.root.join('spec/fixtures')}"