Add test for gitlab_shell.upload_pack config setting
This commit is contained in:
parent
1433068ad9
commit
aae577f921
|
@ -52,12 +52,25 @@ describe 'Git HTTP requests', lib: true do
|
|||
let(:env) { {} }
|
||||
|
||||
context "when the project is public" do
|
||||
it "responds with status 200" do
|
||||
before do
|
||||
project.update_attribute(:visibility_level, Project::PUBLIC)
|
||||
end
|
||||
|
||||
it "responds with status 200" do
|
||||
download(path, env) do |response|
|
||||
expect(response.status).to eq(200)
|
||||
end
|
||||
end
|
||||
|
||||
context 'but git-upload-pack is disabled' do
|
||||
it "responds with status 404" do
|
||||
allow(Gitlab.config.gitlab_shell).to receive(:upload_pack).and_return(false)
|
||||
|
||||
download(path, env) do |response|
|
||||
expect(response.status).to eq(404)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "when the project is private" do
|
||||
|
|
Loading…
Reference in New Issue