Commit aed145a9 authored by Guilherme Garnier's avatar Guilherme Garnier

Fix rubocop warnings in spec/lib and spec/tasks

parent 1cfb48dd
...@@ -151,14 +151,14 @@ describe Grack::Auth do ...@@ -151,14 +151,14 @@ describe Grack::Auth do
end end
it "repeated attempts followed by successful attempt" do 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) expect(attempt_login(false)).to eq(401)
end end
expect(attempt_login(true)).to eq(200) expect(attempt_login(true)).to eq(200)
expect(Rack::Attack::Allow2Ban.banned?(ip)).to be_falsey 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) expect(attempt_login(false)).to eq(401)
end end
end end
......
...@@ -19,10 +19,6 @@ describe Gitlab::OAuth::User do ...@@ -19,10 +19,6 @@ describe Gitlab::OAuth::User do
let!(:existing_user) { create(:omniauth_user, extern_uid: 'my-uid', provider: 'my-provider') } 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 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 expect( oauth_user.persisted? ).to be_truthy
end end
......
...@@ -159,7 +159,7 @@ describe 'gitlab:app namespace rake task' do ...@@ -159,7 +159,7 @@ describe 'gitlab:app namespace rake task' do
end end
it "does not contain skipped item" do it "does not contain skipped item" do
tar_contents, exit_status = Gitlab::Popen.popen( tar_contents, _exit_status = Gitlab::Popen.popen(
%W{tar -tvf #{@backup_tar} db uploads repositories builds} %W{tar -tvf #{@backup_tar} db uploads repositories builds}
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment