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:
authorDouwe Maan <douwe@gitlab.com>2018-04-09 10:49:51 +0300
committerRobert Speicher <rspeicher@gmail.com>2018-04-11 03:01:52 +0300
commit9719d276a0662f59ef5b7313cecff94bd37301c7 (patch)
tree060b34a4f16102a02875af78f7c75904ce7ed6d2 /spec
parent88b903c569c8c47433d291c215c43396c297ace8 (diff)
Merge branch 'sh-handle-legacy-archive-requests' into 'master'
Handle legacy repository archive requests with no ref given Closes #45154 See merge request gitlab-org/gitlab-ce!18246
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects/repositories_controller_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/projects/repositories_controller_spec.rb b/spec/controllers/projects/repositories_controller_spec.rb
index 31b1b52fdd1..c3b71458e38 100644
--- a/spec/controllers/projects/repositories_controller_spec.rb
+++ b/spec/controllers/projects/repositories_controller_spec.rb
@@ -34,6 +34,12 @@ describe Projects::RepositoriesController do
expect(response.header[Gitlab::Workhorse::SEND_DATA_HEADER]).to start_with("git-archive:")
end
+ it 'handles legacy queries with no ref' do
+ get :archive, namespace_id: project.namespace, project_id: project, format: "zip"
+
+ expect(response.header[Gitlab::Workhorse::SEND_DATA_HEADER]).to start_with("git-archive:")
+ end
+
context "when the service raises an error" do
before do
allow(Gitlab::Workhorse).to receive(:send_git_archive).and_raise("Archive failed")