diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-08 06:06:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-08 06:06:48 +0300 |
commit | 18a102a5b95198b6bc8db2589de6353997a33543 (patch) | |
tree | 93aac1bb58c3bfcd7421c279a6436fa50ea05537 /spec/support/shared_examples/requests | |
parent | 1adb4373ba840a9bc771a8c9196f7183fd98b2b8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/shared_examples/requests')
-rw-r--r-- | spec/support/shared_examples/requests/rack_attack_shared_examples.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/support/shared_examples/requests/rack_attack_shared_examples.rb b/spec/support/shared_examples/requests/rack_attack_shared_examples.rb index a2e38cfc60b..0897f643796 100644 --- a/spec/support/shared_examples/requests/rack_attack_shared_examples.rb +++ b/spec/support/shared_examples/requests/rack_attack_shared_examples.rb @@ -74,7 +74,7 @@ shared_examples_for 'rate-limited token-authenticated requests' do expect(response).to have_http_status 200 end - expect_any_instance_of(Rack::Attack::Request).to receive(:ip).and_return('1.2.3.4') + expect_any_instance_of(Rack::Attack::Request).to receive(:ip).at_least(:once).and_return('1.2.3.4') expect_rejection { get(*get_args) } end @@ -194,7 +194,7 @@ shared_examples_for 'rate-limited web authenticated requests' do expect(response).to have_http_status 200 end - expect_any_instance_of(Rack::Attack::Request).to receive(:ip).and_return('1.2.3.4') + expect_any_instance_of(Rack::Attack::Request).to receive(:ip).at_least(:once).and_return('1.2.3.4') expect_rejection { get url_that_requires_authentication } end |