diff options
author | Toon Claes <toon@gitlab.com> | 2017-03-16 11:59:20 +0100 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-03-16 13:54:49 +0100 |
commit | 670427cddea8f157419930f9351a179071451ae5 (patch) | |
tree | 8c1784c02ce3d7b2e13bc0e6a00ca3fa7a62449c /spec/requests/api/issues_spec.rb | |
parent | 4413d97b2a51e25d7d0d6f30e5170f67b4612166 (diff) | |
download | gitlab-ce-670427cddea8f157419930f9351a179071451ae5.tar.gz |
Put the use of "No Label" in the descriptiontc-clean-up-no-label-doc
To get the issues that have no label, the special keyword `No Label`
can be used. This `No Label` label can be used like any other label.
Diffstat (limited to 'spec/requests/api/issues_spec.rb')
-rw-r--r-- | spec/requests/api/issues_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/requests/api/issues_spec.rb b/spec/requests/api/issues_spec.rb index de7dbca0b22..e7738ca3034 100644 --- a/spec/requests/api/issues_spec.rb +++ b/spec/requests/api/issues_spec.rb @@ -153,6 +153,16 @@ describe API::Issues, api: true do expect(json_response.first['state']).to eq('opened') end + it 'returns unlabeled issues for "No Label" label' do + get api("/issues", user), labels: 'No Label' + + expect(response).to have_http_status(200) + expect(response).to include_pagination_headers + expect(json_response).to be_an Array + expect(json_response.length).to eq(1) + expect(json_response.first['labels']).to be_empty + end + it 'returns an empty array if no issue matches labels and state filters' do get api("/issues?labels=#{label.title}&state=closed", user) |