summaryrefslogtreecommitdiff
path: root/spec/requests/api/groups_spec.rb
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-09-25 15:42:34 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-09-25 15:42:34 +0800
commit239332eed3fa870fd41be83864882c0f389840d8 (patch)
treea81aba7617f391f9cb4a67339faa9de67b4426d3 /spec/requests/api/groups_spec.rb
parent961b0849e5098dae74050f6c49ebf3011ce072b7 (diff)
parent7da72a0de296e430378c7eb85fc486a01f3163bd (diff)
downloadgitlab-ce-239332eed3fa870fd41be83864882c0f389840d8.tar.gz
Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
* upstream/master: (168 commits) Update CHANGELOG.md for 10.0.1 Remove Grit settings from default settings Fix duplicate key errors in PostDeployMigrateUserExternalMailData migration Workaround for #38259 Workaround for n+1 in Projects::TreeController#show Removed old icons from project page Make branches page translatable fix typo in icons section Don't show it if there's no project. Update CHANGELOG.md for 10.0.0 Inform user that current shared projects will remain shared Allow the git circuit breaker to correctly handle missing repository storages Reserve refs/replace cos `git-replace` is using it Resolve "Better SVG Usage in the Frontend" Replace the 'project/service.feature' spinach test with an rspec analog Replace the 'project/shortcuts.feature' spinach test with an rspec analog Removed two legacy config options Fix rendering double note issue. IssueNotes: Switch back to Write pane when note cancel or submit. Upgrade Nokogiri because of CVE-2017-9050 ...
Diffstat (limited to 'spec/requests/api/groups_spec.rb')
-rw-r--r--spec/requests/api/groups_spec.rb3
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