Commit eef3f4e2 authored by Quang-Minh Nguyen's avatar Quang-Minh Nguyen

Fix missing mock in rack attack ee spec

parent d9b3cd13
......@@ -6,6 +6,7 @@ RSpec.describe Gitlab::RackAttack, :aggregate_failures do
describe '.configure' do
let(:fake_rack_attack) { class_double("Rack::Attack") }
let(:fake_rack_attack_request) { class_double("Rack::Attack::Request") }
let(:fake_cache) { instance_double("Rack::Attack::Cache") }
before do
stub_const("Rack::Attack", fake_rack_attack)
......@@ -16,6 +17,8 @@ RSpec.describe Gitlab::RackAttack, :aggregate_failures do
allow(fake_rack_attack).to receive(:track)
allow(fake_rack_attack).to receive(:safelist)
allow(fake_rack_attack).to receive(:blocklist)
allow(fake_rack_attack).to receive(:cache).and_return(fake_cache)
allow(fake_cache).to receive(:store=)
end
it 'adds the incident management throttle' do
......
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