summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorGuilherme Garnier <guilherme.garnier@gmail.com>2015-10-03 16:02:21 -0500
committerGuilherme Garnier <guilherme.garnier@gmail.com>2015-10-03 16:02:21 -0500
commitaed145a9c68f5130a8e46602c4b6f1b76c8c13bf (patch)
treeae8af4e4cd4cfafea3d89712d6f11aeb418d5ceb /spec/lib
parent1cfb48ddd005f599a453dcd9a4471fb003e6c222 (diff)
downloadgitlab-ce-aed145a9c68f5130a8e46602c4b6f1b76c8c13bf.tar.gz
Fix rubocop warnings in spec/lib and spec/tasks
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/backend/grack_auth_spec.rb4
-rw-r--r--spec/lib/gitlab/o_auth/user_spec.rb4
2 files changed, 2 insertions, 6 deletions
diff --git a/spec/lib/gitlab/backend/grack_auth_spec.rb b/spec/lib/gitlab/backend/grack_auth_spec.rb
index 829a9c197ef..37c527221a0 100644
--- a/spec/lib/gitlab/backend/grack_auth_spec.rb
+++ b/spec/lib/gitlab/backend/grack_auth_spec.rb
@@ -151,14 +151,14 @@ describe Grack::Auth do
end
it "repeated attempts followed by successful attempt" do
- for n in 0..maxretry do
+ maxretry.times.each do
expect(attempt_login(false)).to eq(401)
end
expect(attempt_login(true)).to eq(200)
expect(Rack::Attack::Allow2Ban.banned?(ip)).to be_falsey
- for n in 0..maxretry do
+ maxretry.times.each do
expect(attempt_login(false)).to eq(401)
end
end
diff --git a/spec/lib/gitlab/o_auth/user_spec.rb b/spec/lib/gitlab/o_auth/user_spec.rb
index c0083fc85be..fd3ab1fb7c8 100644
--- a/spec/lib/gitlab/o_auth/user_spec.rb
+++ b/spec/lib/gitlab/o_auth/user_spec.rb
@@ -19,10 +19,6 @@ describe Gitlab::OAuth::User do
let!(:existing_user) { create(:omniauth_user, extern_uid: 'my-uid', provider: 'my-provider') }
it "finds an existing user based on uid and provider (facebook)" do
- # FIXME (rspeicher): It's unlikely that this test is actually doing anything
- # `auth` is never used and removing it entirely doesn't break the test, so
- # what's it doing?
- auth = double(info: double(name: 'John'), uid: 'my-uid', provider: 'my-provider')
expect( oauth_user.persisted? ).to be_truthy
end