gitlab-org--gitlab-foss/spec/support/forgery_protection.rb

12 lines
273 B
Ruby
Raw Normal View History

2017-07-26 06:34:52 -04:00
RSpec.configure do |config|
config.around(:each, :allow_forgery_protection) do |example|
begin
ActionController::Base.allow_forgery_protection = true
example.call
ensure
ActionController::Base.allow_forgery_protection = false
end
end
end