trabajo-afectivo/spec/support/allow_forgery_protection.rb

14 lines
382 B
Ruby
Raw Permalink Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
RSpec.configure do |config|
config.around(:each, :allow_forgery_protection) do |example|
orig = ActionController::Base.allow_forgery_protection
ActionController::Base.allow_forgery_protection = true
example.run
ensure
ActionController::Base.allow_forgery_protection = orig
end
end