Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-07-26 13:34:52 +0300
committerDouwe Maan <douwe@selenight.nl>2017-07-27 11:32:44 +0300
commitbfe8b96874c66c54e2e4c1a66a520087b217e9e7 (patch)
treee7623d413e8ac605bd810b903303990dfb1e3927 /spec/support
parentdcf4a2e83c69d1be0915f9c4c4f023abee2e7dea (diff)
Add specs
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/forgery_protection.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/support/forgery_protection.rb b/spec/support/forgery_protection.rb
new file mode 100644
index 00000000000..a5e7b761651
--- /dev/null
+++ b/spec/support/forgery_protection.rb
@@ -0,0 +1,11 @@
+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