diff options
Diffstat (limited to 'spec/lib/gitlab/request_forgery_protection_spec.rb')
-rw-r--r-- | spec/lib/gitlab/request_forgery_protection_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/gitlab/request_forgery_protection_spec.rb b/spec/lib/gitlab/request_forgery_protection_spec.rb index 10842173365..dbf9f295706 100644 --- a/spec/lib/gitlab/request_forgery_protection_spec.rb +++ b/spec/lib/gitlab/request_forgery_protection_spec.rb @@ -13,6 +13,11 @@ RSpec.describe Gitlab::RequestForgeryProtection, :allow_forgery_protection do } end + before do + allow(env['rack.session']).to receive(:enabled?).and_return(true) + allow(env['rack.session']).to receive(:loaded?).and_return(true) + end + it 'logs to /dev/null' do expect(ActiveSupport::Logger).to receive(:new).with(File::NULL) |