Skip to content
Snippets Groups Projects
Commit a5ab3467 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent eb30dd6e
No related branches found
No related tags found
No related merge requests found
# frozen_string_literal: true
shared_examples_for 'correctly finds the mail key' do
specify do
expect(Gitlab::Email::Handler).to receive(:for).with(an_instance_of(Mail::Message), 'gitlabhq/gitlabhq+auth_token').and_return(handler)
receiver.execute
end
end
Loading
Loading
@@ -25,7 +25,7 @@ RSpec.shared_examples 'Maintainer manages access requests' do
 
expect_no_visible_access_request(entity, user)
 
page.within('.members-list') do
page.within('[data-qa-selector="members_list"]') do
expect(page).to have_content user.name
end
end
Loading
Loading
Loading
Loading
@@ -2,6 +2,8 @@
 
shared_context 'unique ips sign in limit' do
include StubENV
let(:request_context) { Gitlab::RequestContext.instance }
before do
Gitlab::Redis::Cache.with(&:flushall)
Gitlab::Redis::Queues.with(&:flushall)
Loading
Loading
@@ -15,10 +17,13 @@ shared_context 'unique ips sign in limit' do
unique_ips_limit_enabled: true,
unique_ips_limit_time_window: 10000
)
# Make sure we're working with the same reqeust context everywhere
allow(Gitlab::RequestContext).to receive(:instance).and_return(request_context)
end
 
def change_ip(ip)
allow(Gitlab::RequestContext).to receive(:client_ip).and_return(ip)
allow(request_context).to receive(:client_ip).and_return(ip)
end
 
def request_from_ip(ip)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment