diff options
author | George Andrinopoulos <geoandri@gmail.com> | 2017-02-14 18:51:30 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-02-23 14:06:39 +0300 |
commit | df97e21c4faffaf14f23c407047cde17f61d95ba (patch) | |
tree | 034b54cf7481f24d9330df00b17ec0a8642c502b /spec | |
parent | f106ad513546c8d77b88a0a061a0b6a7e7ee26ed (diff) |
Rebase to master for avoiding failing tests
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/builds_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index 38aef7f2767..76a10a2374c 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -16,6 +16,8 @@ describe API::Builds, api: true do let(:query) { '' } before do + create(:ci_build, :skipped, pipeline: pipeline) + get api("/projects/#{project.id}/builds?#{query}", api_user) end @@ -49,6 +51,18 @@ describe API::Builds, api: true do end end + context 'filter project with scope skipped' do + let(:query) { 'scope=skipped' } + let(:json_build) { json_response.first } + + it 'return builds with status skipped' do + expect(response).to have_http_status 200 + expect(json_response).to be_an Array + expect(json_response.length).to eq 1 + expect(json_build['status']).to eq 'skipped' + end + end + context 'filter project with array of scope elements' do let(:query) { 'scope[0]=pending&scope[1]=running' } |