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:
Diffstat (limited to 'spec/controllers/projects/pipelines_controller_spec.rb')
-rw-r--r--spec/controllers/projects/pipelines_controller_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb
index 74931fcdeb2..0368130118f 100644
--- a/spec/controllers/projects/pipelines_controller_spec.rb
+++ b/spec/controllers/projects/pipelines_controller_spec.rb
@@ -923,10 +923,18 @@ describe Projects::PipelinesController do
end
context 'ref provided' do
+ render_views
+
before do
create(:ci_pipeline, ref: 'master', project: project)
end
+ it 'shows a 404 if no pipeline exists' do
+ get :show, params: { namespace_id: project.namespace, project_id: project, latest: true, ref: 'non-existence' }
+
+ expect(response).to have_gitlab_http_status(:not_found)
+ end
+
it 'shows the latest pipeline for the provided ref' do
get :show, params: { namespace_id: project.namespace, project_id: project, latest: true, ref: branch_secondary.name }