diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-08 14:01:31 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-01-08 14:01:31 +0100 |
commit | 549a2fa7873366b52e9ba3caa849073b7b958b73 (patch) | |
tree | 902d2cb4c00429a13394ff61a903d6e5e71016ae /spec | |
parent | a862ade55bf68f56734538b40e02e56036f8a1bd (diff) | |
download | gitlab-ce-549a2fa7873366b52e9ba3caa849073b7b958b73.tar.gz |
Modify builds scope filtering in builds API
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/builds_spec.rb | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/spec/requests/api/builds_spec.rb b/spec/requests/api/builds_spec.rb index d4af7639d4b..a953eb2fac2 100644 --- a/spec/requests/api/builds_spec.rb +++ b/spec/requests/api/builds_spec.rb @@ -18,7 +18,20 @@ describe API::API, api: true do it 'should return project builds' do get api("/projects/#{project.id}/builds", user) - puts json_response + expect(response.status).to eq(200) + expect(json_response).to be_an Array + end + + it 'should filter project with one scope element' do + get api("/projects/#{project.id}/builds?scope=pending", user) + + expect(response.status).to eq(200) + expect(json_response).to be_an Array + end + + it 'should filter project with array of scope elements' do + get api("/projects/#{project.id}/builds?scope[0]=pending&scope[1]=running", user) + expect(response.status).to eq(200) expect(json_response).to be_an Array end |