diff options
author | Toon Claes <toon@gitlab.com> | 2017-03-07 20:54:39 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-07 23:45:32 +0100 |
commit | 901fbda67c2c8781bb8bdb0b1a7d7869a81bc93e (patch) | |
tree | e679cdf0193608f70c7922658c97e754244b3b26 /spec | |
parent | f37240067301548a41a6257792d3926b68328e62 (diff) | |
download | gitlab-ce-901fbda67c2c8781bb8bdb0b1a7d7869a81bc93e.tar.gz |
Make it possible to query scope as scope[]=
Since issues also accepts the query parameter iids[]=, also make it
possible query scope like that.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/requests/api/jobs_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/requests/api/jobs_spec.rb b/spec/requests/api/jobs_spec.rb index cfd7de7e4e9..9450701064b 100644 --- a/spec/requests/api/jobs_spec.rb +++ b/spec/requests/api/jobs_spec.rb @@ -51,7 +51,7 @@ describe API::Jobs, api: true do end context 'filter project with array of scope elements' do - let(:query) { { 'scope[0]' => 'pending', 'scope[1]' => 'running' } } + let(:query) { { scope: %w(pending running) } } it do expect(response).to have_http_status(200) @@ -60,7 +60,7 @@ describe API::Jobs, api: true do end context 'respond 400 when scope contains invalid state' do - let(:query) { { 'scope[0]' => 'unknown', 'scope[1]' => 'running' } } + let(:query) { { scope: %w(unknown running) } } it { expect(response).to have_http_status(400) } end @@ -114,7 +114,7 @@ describe API::Jobs, api: true do end context 'filter jobs with array of scope elements' do - let(:query) { { 'scope[0]' => 'pending', 'scope[1]' => 'running' } } + let(:query) { { scope: %w(pending running) } } it do expect(response).to have_http_status(200) @@ -123,7 +123,7 @@ describe API::Jobs, api: true do end context 'respond 400 when scope contains invalid state' do - let(:query) { { 'scope[0]' => 'unknown', 'scope[1]' => 'running' } } + let(:query) { { scope: %w(unknown running) } } it { expect(response).to have_http_status(400) } end |