summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorSteve Azzopardi <sazzopardi@gitlab.com>2018-09-11 17:13:24 +0000
committerKamil TrzciƄski <ayufan@ayufan.eu>2018-09-11 17:13:24 +0000
commite254da811fcdde1e89d4cf9b1129537225505e68 (patch)
tree15cc32f5f1bdeff59e4aa90c774229267fccfc98 /spec/controllers
parent7dd8d37984efb93c58f0f56fe7394ff5d90fbe11 (diff)
downloadgitlab-ce-e254da811fcdde1e89d4cf9b1129537225505e68.tar.gz
Add empty state illustration information in job API
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/projects/jobs_controller_spec.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/projects/jobs_controller_spec.rb b/spec/controllers/projects/jobs_controller_spec.rb
index 751919f9501..8b6903011c3 100644
--- a/spec/controllers/projects/jobs_controller_spec.rb
+++ b/spec/controllers/projects/jobs_controller_spec.rb
@@ -194,6 +194,18 @@ describe Projects::JobsController, :clean_gitlab_redis_shared_state do
expect(json_response['terminal_path']).to match(%r{/terminal})
end
end
+
+ context 'when job passed with no trace' do
+ let(:job) { create(:ci_build, :success, :artifacts, pipeline: pipeline) }
+
+ it 'exposes empty state illustrations' do
+ expect(response).to have_gitlab_http_status(:ok)
+ expect(response).to match_response_schema('job/job_details')
+ expect(json_response['status']['illustration']).to have_key('image')
+ expect(json_response['status']['illustration']).to have_key('size')
+ expect(json_response['status']['illustration']).to have_key('title')
+ end
+ end
end
def get_show(**extra_params)