diff options
author | Stan Hu <stanhu@gmail.com> | 2015-11-10 21:28:12 +0000 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-11-10 21:28:12 +0000 |
commit | 83ec84946ca8b0b71ae201de65991635c50dd518 (patch) | |
tree | c0ef2d419c21b37f28fec8fa0d07cb687bddd3f5 /spec | |
parent | ca25289b78e1b49148438831ad6bf165fa0ce56e (diff) | |
parent | 91cbf9db0c5c95381e7d422fd684e623d58fadab (diff) | |
download | gitlab-ce-83ec84946ca8b0b71ae201de65991635c50dd518.tar.gz |
Merge branch 'add-allow-failure-status' into 'master'
Add allow_failure field to commit status API
Closes #3196
See merge request !1685
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/commit_status_spec.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/spec/requests/api/commit_status_spec.rb b/spec/requests/api/commit_status_spec.rb index b9e6dfc15a7..a28607bd240 100644 --- a/spec/requests/api/commit_status_spec.rb +++ b/spec/requests/api/commit_status_spec.rb @@ -18,7 +18,7 @@ describe API::API, api: true do before do @status1 = create(:commit_status, commit: ci_commit, status: 'running') @status2 = create(:commit_status, commit: ci_commit, name: 'coverage', status: 'pending') - @status3 = create(:commit_status, commit: ci_commit, name: 'coverage', ref: 'develop', status: 'running') + @status3 = create(:commit_status, commit: ci_commit, name: 'coverage', ref: 'develop', status: 'running', allow_failure: true) @status4 = create(:commit_status, commit: ci_commit, name: 'coverage', status: 'success') @status5 = create(:commit_status, commit: ci_commit, ref: 'develop', status: 'success') @status6 = create(:commit_status, commit: ci_commit, status: 'success') @@ -30,6 +30,8 @@ describe API::API, api: true do expect(json_response).to be_an Array expect(statuses_id).to contain_exactly(@status3.id, @status4.id, @status5.id, @status6.id) + json_response.sort_by!{ |status| status['id'] } + expect(json_response.map{ |status| status['allow_failure'] }).to eq([true, false, false, false]) end it "should return all commit statuses" do |