Skip to content

Commit

Permalink
[frontend] Refactor test for find_with_credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
bgeuken committed Mar 23, 2018
1 parent 246ae4c commit 71aea73
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/api/spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -818,11 +818,9 @@
end

context 'when user exist but password was incorrect' do
before do
@found_user = User.find_with_credentials(user.login, '_buildservice')
end
subject { User.find_with_credentials(user.login, '_buildservice') }

it { expect(@found_user).to be nil }
it { is_expected.to be nil }
it { expect(user.reload.login_failure_count).to eq 8 }
end

Expand Down

0 comments on commit 71aea73

Please sign in to comment.