diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-16 12:06:31 +0300 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-09-16 12:12:22 +0300 |
commit | a387ff7ba85dc75608ae5347aa405ea30b4e8c8c (patch) | |
tree | 7121d96944f5a45073e80cc239123c03b4c1ccbb /spec/lib/gitlab/auth_spec.rb | |
parent | e941365f3be88cebd57e9b08ba8702c1b688cb94 (diff) |
Fix specs after renaming authentication_capabilities
Diffstat (limited to 'spec/lib/gitlab/auth_spec.rb')
-rw-r--r-- | spec/lib/gitlab/auth_spec.rb | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/spec/lib/gitlab/auth_spec.rb b/spec/lib/gitlab/auth_spec.rb index 744282b2afa..d3707005a0e 100644 --- a/spec/lib/gitlab/auth_spec.rb +++ b/spec/lib/gitlab/auth_spec.rb @@ -26,16 +26,18 @@ describe Gitlab::Auth, lib: true do end end - context 'for non-running build' do - let!(:build) { create(:ci_build, :pending) } - let(:project) { build.project } - - before do - expect(gl_auth).to receive(:rate_limit!).with('ip', success: false, login: 'gitlab-ci-token') - end - - it 'denies authentication' do - expect(subject).to eq(Gitlab::Auth::Result.new) + (HasStatus::AVAILABLE_STATUSES - [:running]).each do |build_status| + context "for #{build_status} build" do + let!(:build) { create(:ci_build, status: build_status) } + let(:project) { build.project } + + before do + expect(gl_auth).to receive(:rate_limit!).with('ip', success: false, login: 'gitlab-ci-token') + end + + it 'denies authentication' do + expect(subject).not_to eq(Gitlab::Auth::Result.new) + end end end end |