Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-24 21:18:26 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-24 21:19:27 +0300
commit04c4445ae088f2599659522c70a096811ecd0496 (patch)
tree27e06546ac03c8f847c69ad2a434b685a0c8027e /spec/lib/gitlab/backend
parentce19e1739ef8bfbc192be6e5f7effe6d9feb777d (diff)
Test grace auth against gitlab_ci_project with token
Diffstat (limited to 'spec/lib/gitlab/backend')
-rw-r--r--spec/lib/gitlab/backend/grack_auth_spec.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/lib/gitlab/backend/grack_auth_spec.rb b/spec/lib/gitlab/backend/grack_auth_spec.rb
index b0b2f3f72f1..829a9c197ef 100644
--- a/spec/lib/gitlab/backend/grack_auth_spec.rb
+++ b/spec/lib/gitlab/backend/grack_auth_spec.rb
@@ -175,11 +175,14 @@ describe Grack::Auth do
context "when a gitlab ci token is provided" do
let(:token) { "123" }
+ let(:gitlab_ci_project) { FactoryGirl.create :ci_project, token: token }
before do
+ project.gitlab_ci_project = gitlab_ci_project
+ project.save
+
gitlab_ci_service = project.build_gitlab_ci_service
gitlab_ci_service.active = true
- allow(gitlab_ci_service).to receive(:token).and_return(token)
gitlab_ci_service.save
env["HTTP_AUTHORIZATION"] = ActionController::HttpAuthentication::Basic.encode_credentials("gitlab-ci-token", token)