diff options
author | Stan Hu <stanhu@gmail.com> | 2015-10-26 09:26:03 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-11-04 07:41:19 +0300 |
commit | 91cbf9db0c5c95381e7d422fd684e623d58fadab (patch) | |
tree | ebaf2814096b3b652fe0082c360ffeaecb06ebd3 /spec/requests | |
parent | 482a17089fae42bd15303206788734ab9ac99453 (diff) |
Add allow_failure field to commit status API
Closes #3196
Diffstat (limited to 'spec/requests')
-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 |