Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared_examples/lib/gitlab/unique_ip_check_shared_examples.rb')
-rw-r--r--spec/support/shared_examples/lib/gitlab/unique_ip_check_shared_examples.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/support/shared_examples/lib/gitlab/unique_ip_check_shared_examples.rb b/spec/support/shared_examples/lib/gitlab/unique_ip_check_shared_examples.rb
index e42a927b5ba..c735b98aa23 100644
--- a/spec/support/shared_examples/lib/gitlab/unique_ip_check_shared_examples.rb
+++ b/spec/support/shared_examples/lib/gitlab/unique_ip_check_shared_examples.rb
@@ -7,13 +7,13 @@ RSpec.shared_examples 'user login operation with unique ip limit' do
end
it 'allows user authenticating from the same ip' do
- expect { operation_from_ip('ip') }.not_to raise_error
- expect { operation_from_ip('ip') }.not_to raise_error
+ expect { operation_from_ip('111.221.4.3') }.not_to raise_error
+ expect { operation_from_ip('111.221.4.3') }.not_to raise_error
end
it 'blocks user authenticating from two distinct ips' do
- expect { operation_from_ip('ip') }.not_to raise_error
- expect { operation_from_ip('ip2') }.to raise_error(Gitlab::Auth::TooManyIps)
+ expect { operation_from_ip('111.221.4.3') }.not_to raise_error
+ expect { operation_from_ip('1.2.2.3') }.to raise_error(Gitlab::Auth::TooManyIps)
end
end
end
@@ -25,13 +25,13 @@ RSpec.shared_examples 'user login request with unique ip limit' do |success_stat
end
it 'allows user authenticating from the same ip' do
- expect(request_from_ip('ip')).to have_gitlab_http_status(success_status)
- expect(request_from_ip('ip')).to have_gitlab_http_status(success_status)
+ expect(request_from_ip('111.221.4.3')).to have_gitlab_http_status(success_status)
+ expect(request_from_ip('111.221.4.3')).to have_gitlab_http_status(success_status)
end
it 'blocks user authenticating from two distinct ips' do
- expect(request_from_ip('ip')).to have_gitlab_http_status(success_status)
- expect(request_from_ip('ip2')).to have_gitlab_http_status(:forbidden)
+ expect(request_from_ip('111.221.4.3')).to have_gitlab_http_status(success_status)
+ expect(request_from_ip('1.2.2.3')).to have_gitlab_http_status(:forbidden)
end
end
end