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
path: root/spec
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2017-05-04 00:07:54 +0300
committerAlejandro Rodríguez <alejorro70@gmail.com>2017-05-05 16:52:06 +0300
commit8bc381db90c92bca6ba868d1588af1ad1a41073b (patch)
treee10f3f04f40493315b02938b7a7726537072b968 /spec
parent5249157552bbf4cbf279b1decbd4a0e90e056077 (diff)
Pass GL_REPOSITORY in Workhorse responses
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/workhorse_spec.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/spec/lib/gitlab/workhorse_spec.rb b/spec/lib/gitlab/workhorse_spec.rb
index b703e9808a8..beb1791a429 100644
--- a/spec/lib/gitlab/workhorse_spec.rb
+++ b/spec/lib/gitlab/workhorse_spec.rb
@@ -181,10 +181,23 @@ describe Gitlab::Workhorse, lib: true do
let(:user) { create(:user) }
let(:repo_path) { repository.path_to_repo }
let(:action) { 'info_refs' }
+ let(:params) do
+ { GL_ID: "user-#{user.id}", GL_REPOSITORY: "project-#{project.id}", RepoPath: repo_path }
+ end
+
+ subject { described_class.git_http_ok(repository, false, user, action) }
+
+ it { expect(subject).to include(params) }
- subject { described_class.git_http_ok(repository, user, action) }
+ context 'when is_wiki' do
+ let(:params) do
+ { GL_ID: "user-#{user.id}", GL_REPOSITORY: "wiki-#{project.id}", RepoPath: repo_path }
+ end
+
+ subject { described_class.git_http_ok(repository, true, user, action) }
- it { expect(subject).to include({ GL_ID: "user-#{user.id}", RepoPath: repo_path }) }
+ it { expect(subject).to include(params) }
+ end
context 'when Gitaly is enabled' do
let(:gitaly_params) do