diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-06-16 17:51:35 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-06-16 17:51:35 +0000 |
commit | 9b835d10d2c13b55b84461589542b9c77ab90b45 (patch) | |
tree | 76074b7c0865006b6df6e007793f6c5cc391f515 /spec/controllers | |
parent | 11b3e54cfe709fdfcbf3d56fa894c4e8c781cef7 (diff) | |
parent | aeaf58609b401b467cbc0c83d3b0a5cb9c04a440 (diff) | |
download | gitlab-ce-9b835d10d2c13b55b84461589542b9c77ab90b45.tar.gz |
Merge branch 'tc-fix-group-finder-subgrouping' into 'master'
Show private subgroups if member of parent group
Closes #32135
See merge request !11764
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/groups_controller_spec.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/spec/controllers/groups_controller_spec.rb b/spec/controllers/groups_controller_spec.rb index b0b24b1de1b..c4092303a67 100644 --- a/spec/controllers/groups_controller_spec.rb +++ b/spec/controllers/groups_controller_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' describe GroupsController do let(:user) { create(:user) } - let(:group) { create(:group) } + let(:group) { create(:group, :public) } let(:project) { create(:empty_project, namespace: group) } let!(:group_member) { create(:group_member, group: group, user: user) } @@ -35,14 +35,15 @@ describe GroupsController do sign_in(user) end - it 'shows the public subgroups' do + it 'shows all subgroups' do get :subgroups, id: group.to_param - expect(assigns(:nested_groups)).to contain_exactly(public_subgroup) + expect(assigns(:nested_groups)).to contain_exactly(public_subgroup, private_subgroup) end - context 'being member' do + context 'being member of private subgroup' do it 'shows public and private subgroups the user is member of' do + group_member.destroy! private_subgroup.add_guest(user) get :subgroups, id: group.to_param |