diff options
author | Shinya Maeda <shinya@gitlab.com> | 2017-08-30 21:20:54 +0300 |
---|---|---|
committer | Shinya Maeda <shinya@gitlab.com> | 2017-09-05 08:30:28 +0300 |
commit | dcf09d11447c264f4b4028ea80eea2be913c2f5b (patch) | |
tree | d992feb77bb5246ba05ebf18610b05bce8859c63 /spec/requests | |
parent | 597bc29260c4be3a1527a1c5307bec40004bac4d (diff) |
Implement `failure_reason` on `ci_builds`
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/commit_statuses_spec.rb | 3 | ||||
-rw-r--r-- | spec/requests/api/runner_spec.rb | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/spec/requests/api/commit_statuses_spec.rb b/spec/requests/api/commit_statuses_spec.rb index cc71865e1f3..ce54a5702e3 100644 --- a/spec/requests/api/commit_statuses_spec.rb +++ b/spec/requests/api/commit_statuses_spec.rb @@ -142,6 +142,9 @@ describe API::CommitStatuses do expect(json_response['ref']).not_to be_empty expect(json_response['target_url']).to be_nil expect(json_response['description']).to be_nil + if status == 'failed' + expect(CommitStatus.find(json_response['id'])).to be_failed_by_api + end end end end diff --git a/spec/requests/api/runner_spec.rb b/spec/requests/api/runner_spec.rb index 993164aa8fe..23c2e7aa978 100644 --- a/spec/requests/api/runner_spec.rb +++ b/spec/requests/api/runner_spec.rb @@ -627,12 +627,14 @@ describe API::Runner do update_job(state: 'success') expect(job.reload.status).to eq 'success' + expect(job).to be_no_error end it 'mark job as failed' do update_job(state: 'failed') expect(job.reload.status).to eq 'failed' + expect(job).to be_failed_by_failed_job_state end end |