summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzesiek.bizon@gmail.com>2019-05-06 12:45:24 +0200
committerFilipa Lacerda <filipa@gitlab.com>2019-05-24 10:04:04 +0100
commita12b61849cec04bb1d391f51bfe6fae87873e6ca (patch)
treeb888ba32a843395a067e1b96c73a104ae003b000
parentb9c19f6b0f5c85956bf85935452c34fc6a21bcb0 (diff)
downloadgitlab-ce-a12b61849cec04bb1d391f51bfe6fae87873e6ca.tar.gz
Add a controller test verifying exposure of stages
-rw-r--r--spec/controllers/projects/jobs_controller_spec.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb
index bd30d4ee88b..982e64c4887 100644
--- a/spec/controllers/projects/jobs_controller_spec.rb
+++ b/spec/controllers/projects/jobs_controller_spec.rb
@@ -148,6 +148,12 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
get_show(id: job.id, format: :json)
end
+ it 'does not serialize builds in exposed stages' do
+ json_response.dig('pipeline', 'details', 'stages').tap do |stages|
+ expect(stages.map(&:keys).flatten).to eq %w[name title status path dropdown_path]
+ end
+ end
+
context 'when job failed' do
it 'exposes needed information' do
expect(response).to have_gitlab_http_status(:ok)