diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-03-30 17:14:21 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-04-18 11:12:27 -0300 |
commit | 668d6ffa437aa5c920e987beb5de4e8dacbfd00c (patch) | |
tree | 0d61586b4cbc49916c9c54a3d710d22609966048 /spec/controllers/groups | |
parent | 57519565f167cb771ffed504feefe7b0eb37c027 (diff) | |
download | gitlab-ce-668d6ffa437aa5c920e987beb5de4e8dacbfd00c.tar.gz |
Add specs and fix code
Diffstat (limited to 'spec/controllers/groups')
-rw-r--r-- | spec/controllers/groups/group_members_controller_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/controllers/groups/group_members_controller_spec.rb b/spec/controllers/groups/group_members_controller_spec.rb new file mode 100644 index 00000000000..3a4dd2bf1fa --- /dev/null +++ b/spec/controllers/groups/group_members_controller_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe Groups::GroupMembersController do + let(:user) { create(:user) } + let(:group) { create(:group) } + + + context "When public visibility level is restricted" do + before do + group.add_owner(user) + stub_application_setting(restricted_visibility_levels: [Gitlab::VisibilityLevel::PUBLIC]) + end + + it 'does not show group members' do + get :index, group_id: group.path + expect(response.status).to eq(404) + end + end +end |