diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-21 13:31:20 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-04-21 13:31:20 +0300 |
commit | 338f6f09028d8c4214845fe88a307eed0dc1a8c4 (patch) | |
tree | 5c7caa5193301fe1ab4a48c7fb11526ad0e30edd /spec/controllers | |
parent | a5ed44fd711ea55e3f76b364b2cc797ea0f38ba7 (diff) | |
parent | 9581aba4d46f4f31e0ae1f4b76726d5ad01041e7 (diff) |
Merge branch 'issue_5838' into 'master'
Show project members only for members
fixes #5838
See merge request !3752
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/project_members_controller_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/controllers/projects/project_members_controller_spec.rb b/spec/controllers/projects/project_members_controller_spec.rb index d47e4ab9a4f..ed64e7cf9af 100644 --- a/spec/controllers/projects/project_members_controller_spec.rb +++ b/spec/controllers/projects/project_members_controller_spec.rb @@ -46,4 +46,20 @@ describe Projects::ProjectMembersController do end end end + + describe '#index' do + let(:project) { create(:project, :private) } + + context 'when user is member' do + let(:member) { create(:user) } + + before do + project.team << [member, :guest] + sign_in(member) + get :index, namespace_id: project.namespace.to_param, project_id: project.to_param + end + + it { expect(response.status).to eq(200) } + end + end end |