summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorPatricio Cano <suprnova32@gmail.com>2016-09-15 11:54:24 -0500
committerPatricio Cano <suprnova32@gmail.com>2016-09-15 12:21:00 -0500
commitbe09bcf074e6048aa9ba5f8dfb99754e6afbe156 (patch)
tree005f87b80bfe5e3f2320398252b18eb7601cbb8f /spec/lib
parentde24075ea5960bd7c6290c05496915e8f0ca23f2 (diff)
downloadgitlab-ce-be09bcf074e6048aa9ba5f8dfb99754e6afbe156.tar.gz
Refactored authentication code to make it a bit clearer, added test for wrong SSH key.
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/auth_spec.rb2
-rw-r--r--spec/lib/gitlab/lfs_token_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb
index 56f349f5d92..13c5a7156f5 100644
--- a/spec/lib/gitlab/auth_spec.rb
+++ b/spec/lib/gitlab/auth_spec.rb
@@ -55,7 +55,7 @@ describe Gitlab::Auth, lib: true do
login = 'foo'
ip = 'ip'
- expect(gl_auth).to receive(:rate_limit!).with(ip, success: false, login: login)
+ expect(gl_auth).to receive(:rate_limit!).with(ip, success: nil, login: login)
expect(gl_auth.find_for_git_client(login, 'bar', project: nil, ip: ip)).to eq(Gitlab::Auth::Result.new)
end
end
diff --git a/spec/lib/gitlab/lfs_token_spec.rb b/spec/lib/gitlab/lfs_token_spec.rb
index 184f235c1b2..9f04f67e0a8 100644
--- a/spec/lib/gitlab/lfs_token_spec.rb
+++ b/spec/lib/gitlab/lfs_token_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::LfsToken, lib: true do
- describe '#set_token and #get_value' do
+ describe '#generate and #value' do
shared_examples 'an LFS token generator' do
it 'returns a randomly generated token' do
token = handler.generate