diff options
author | Stan Hu <stanhu@gmail.com> | 2015-10-26 07:26:03 +0100 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-11-03 20:41:19 -0800 |
commit | 91cbf9db0c5c95381e7d422fd684e623d58fadab (patch) | |
tree | ebaf2814096b3b652fe0082c360ffeaecb06ebd3 /spec | |
parent | 482a17089fae42bd15303206788734ab9ac99453 (diff) | |
download | gitlab-ce-91cbf9db0c5c95381e7d422fd684e623d58fadab.tar.gz |
Add allow_failure field to commit status API
Closes #3196
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 |