diff options
author | Fatih Acet <acetfatih@gmail.com> | 2016-10-05 19:58:33 +0000 |
---|---|---|
committer | Fatih Acet <acetfatih@gmail.com> | 2016-10-05 19:58:33 +0000 |
commit | f5e30567c8fb5d441a2a53c39a5fc24fc897a625 (patch) | |
tree | 44a485fcc3ab61ce35a3b385ec6df68ff5da2182 /spec/requests | |
parent | 966bbb9f3110e1bb390334653caedec55cc8c6a3 (diff) | |
parent | 35ced4dae480d61ddc4d73eb4695626ecc419e9c (diff) | |
download | gitlab-ce-f5e30567c8fb5d441a2a53c39a5fc24fc897a625.tar.gz |
Merge branch 'fix_group_links_404' into 'master'
fix group links 404
### What does this MR do?
This MR should fix the 404 page, when creating a new group links without selecting any group from the group dropdown list.
### What are the relevant issue numbers?
Closes #20766
See merge request !6155
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/groups_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index 1f68ef1af8f..3ba257256a0 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -45,6 +45,16 @@ describe API::API, api: true do expect(json_response.length).to eq(2) end end + + context "when using skip_groups in request" do + it "returns all groups excluding skipped groups" do + get api("/groups", admin), skip_groups: [group2.id] + + expect(response).to have_http_status(200) + expect(json_response).to be_an Array + expect(json_response.length).to eq(1) + end + end end describe "GET /groups/:id" do |