diff options
-rw-r--r-- | spec/spec_helper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 9f6f0204a16..225d87251e8 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -127,6 +127,14 @@ RSpec.configure do |config| reset_delivered_emails! end + config.around(:example, :js) do |example| + Gitlab::Application.config.allow_forgery_protection = true + + example.run + + Gitlab::Application.config.allow_forgery_protection = false + end + config.around(:each, :use_clean_rails_memory_store_caching) do |example| caching_store = Rails.cache Rails.cache = ActiveSupport::Cache::MemoryStore.new |