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:
authorLinus G Thiel <linus@yesbabyyes.se>2016-10-05 19:13:49 +0300
committerLinus G Thiel <linus@yesbabyyes.se>2016-10-05 20:28:39 +0300
commit6b9671388d523a03b058e1cc467de77d805fc7a2 (patch)
tree624b3a8fb2bed7c6f0307065b7b108b543a4cf42 /spec/controllers/projects/tags_controller_spec.rb
parentc36544de9fa07f9d9aaa162a7c70a9dc644ae23b (diff)
Respond with 404 Not Found for non-existent tags
Non-existent tags should be handled with 404 Not Found.
Diffstat (limited to 'spec/controllers/projects/tags_controller_spec.rb')
-rw-r--r--spec/controllers/projects/tags_controller_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/controllers/projects/tags_controller_spec.rb b/spec/controllers/projects/tags_controller_spec.rb
index a6995145cc1..5e661c2c41d 100644
--- a/spec/controllers/projects/tags_controller_spec.rb
+++ b/spec/controllers/projects/tags_controller_spec.rb
@@ -17,4 +17,18 @@ describe Projects::TagsController do
expect(assigns(:releases)).not_to include(invalid_release)
end
end
+
+ describe 'GET show' do
+ before { get :show, namespace_id: project.namespace.to_param, project_id: project.to_param, id: id }
+
+ context "valid tag" do
+ let(:id) { 'v1.0.0' }
+ it { is_expected.to respond_with(:success) }
+ end
+
+ context "invalid tag" do
+ let(:id) { 'latest' }
+ it { is_expected.to respond_with(:not_found) }
+ end
+ end
end