summaryrefslogtreecommitdiff
path: root/spec/controllers/projects/pipelines_controller_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/controllers/projects/pipelines_controller_spec.rb')
-rw-r--r--spec/controllers/projects/pipelines_controller_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/controllers/projects/pipelines_controller_spec.rb b/spec/controllers/projects/pipelines_controller_spec.rb
index 04bb5cbbd59..b8ab9933f33 100644
--- a/spec/controllers/projects/pipelines_controller_spec.rb
+++ b/spec/controllers/projects/pipelines_controller_spec.rb
@@ -69,4 +69,21 @@ describe Projects::PipelinesController do
format: :json
end
end
+
+ describe 'GET status.json' do
+ context 'when accessing status' do
+ before do
+ pipeline = create(:ci_pipeline, project: project, status: 'success')
+ get :status, namespace_id: project.namespace,
+ project_id: project,
+ id: pipeline.id,
+ format: :json
+ end
+
+ it 'returns pipeline status via PipelineSerializer' do
+ expect(response).to have_http_status(:ok)
+ expect(json_response['details']['status']['text']).to eq 'passed'
+ end
+ end
+ end
end