diff options
author | Nick Thomas <nick@gitlab.com> | 2017-09-19 12:44:02 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2017-09-19 12:59:05 +0100 |
commit | 47cf3b4b6178b75cc39dbe74c0701e6a44b26fe4 (patch) | |
tree | 11b61104655610e843f8bf41f2958833a3b21061 /spec/requests | |
parent | 404a56235f86a69b05991efcf4cc5d7c5f5c4567 (diff) | |
download | gitlab-ce-47cf3b4b6178b75cc39dbe74c0701e6a44b26fe4.tar.gz |
Fix the groups API endpoint to handle ?owned=true correctly
Diffstat (limited to 'spec/requests')
-rw-r--r-- | spec/requests/api/groups_spec.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/spec/requests/api/groups_spec.rb b/spec/requests/api/groups_spec.rb index 42f0079e173..1671a046fdf 100644 --- a/spec/requests/api/groups_spec.rb +++ b/spec/requests/api/groups_spec.rb @@ -159,11 +159,14 @@ describe API::Groups do context 'when using owned in the request' do it 'returns an array of groups the user owns' do + group1.add_master(user2) + get api('/groups', user2), owned: true 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['name']).to eq(group2.name) end end |