Commit 3713867b authored by Douwe Maan's avatar Douwe Maan

Merge branch 'ce-jej/group-saml-skip-forgery-protection' into 'master'

[CE] Backport with_forgery_protection spec helper

See merge request gitlab-org/gitlab-ce!18833
parents 05a6e2b8 bbc53f2b
RSpec.configure do |config| module ForgeryProtection
config.around(:each, :allow_forgery_protection) do |example| def with_forgery_protection
begin
ActionController::Base.allow_forgery_protection = true ActionController::Base.allow_forgery_protection = true
yield
example.call
ensure ensure
ActionController::Base.allow_forgery_protection = false ActionController::Base.allow_forgery_protection = false
end end
module_function :with_forgery_protection
end
RSpec.configure do |config|
config.around(:each, :allow_forgery_protection) do |example|
ForgeryProtection.with_forgery_protection do
example.call
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment