summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-09-16 11:06:31 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2016-09-16 11:12:22 +0200
commita387ff7ba85dc75608ae5347aa405ea30b4e8c8c (patch)
tree7121d96944f5a45073e80cc239123c03b4c1ccbb /spec
parente941365f3be88cebd57e9b08ba8702c1b688cb94 (diff)
downloadgitlab-ce-a387ff7ba85dc75608ae5347aa405ea30b4e8c8c.tar.gz
Fix specs after renaming authentication_capabilities
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/auth_spec.rb22
-rw-r--r--spec/lib/gitlab/git_access_wiki_spec.rb2
2 files changed, 13 insertions, 11 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
diff --git a/spec/lib/gitlab/git_access_wiki_spec.rb b/spec/lib/gitlab/git_access_wiki_spec.rb
index d05f0beb080..576cda595bb 100644
--- a/spec/lib/gitlab/git_access_wiki_spec.rb
+++ b/spec/lib/gitlab/git_access_wiki_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe Gitlab::GitAccessWiki, lib: true do
- let(:access) { Gitlab::GitAccessWiki.new(user, project, 'web', authentication_abilities) }
+ let(:access) { Gitlab::GitAccessWiki.new(user, project, 'web', authentication_abilities: authentication_abilities) }
let(:project) { create(:project) }
let(:user) { create(:user) }
let(:authentication_abilities) do