diff options
author | Rémy Coutable <remy@rymai.me> | 2017-12-05 15:03:16 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-12-12 18:14:58 +0100 |
commit | 50d7c356c2d1622203b518bf0f3d5cbf1860099a (patch) | |
tree | 4b591c06bb2eea41304985062150c5db4cd5ea67 /spec/presenters | |
parent | 2cf3fc18a6e111a820f9842bb1d939790e8625eb (diff) | |
download | gitlab-ce-50d7c356c2d1622203b518bf0f3d5cbf1860099a.tar.gz |
Present member collection at the controller leveltmlee/gitlab-ce-28004-consider-refactoring-member-view-by-using-presenter
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/presenters')
-rw-r--r-- | spec/presenters/group_member_presenter_spec.rb | 2 | ||||
-rw-r--r-- | spec/presenters/project_member_presenter_spec.rb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/spec/presenters/group_member_presenter_spec.rb b/spec/presenters/group_member_presenter_spec.rb index 05a6dee3196..c00e41725d9 100644 --- a/spec/presenters/group_member_presenter_spec.rb +++ b/spec/presenters/group_member_presenter_spec.rb @@ -64,6 +64,7 @@ describe GroupMemberPresenter do context 'when user cannot update_group_member' do before do allow(presenter).to receive(:can?).with(user, :update_group_member, presenter).and_return(false) + allow(presenter).to receive(:can?).with(user, :override_group_member, presenter).and_return(false) end it { expect(presenter.can_update?).to eq(false) } @@ -105,6 +106,7 @@ describe GroupMemberPresenter do context 'when user cannot update_group_member' do before do allow(presenter).to receive(:can?).with(user, :update_group_member, presenter).and_return(false) + allow(presenter).to receive(:can?).with(user, :override_group_member, presenter).and_return(false) end it { expect(presenter.can_approve?).to eq(false) } diff --git a/spec/presenters/project_member_presenter_spec.rb b/spec/presenters/project_member_presenter_spec.rb index eb93f03a958..83db5c56cdf 100644 --- a/spec/presenters/project_member_presenter_spec.rb +++ b/spec/presenters/project_member_presenter_spec.rb @@ -64,6 +64,7 @@ describe ProjectMemberPresenter do context 'when user cannot update_project_member' do before do allow(presenter).to receive(:can?).with(user, :update_project_member, presenter).and_return(false) + allow(presenter).to receive(:can?).with(user, :override_project_member, presenter).and_return(false) end it { expect(presenter.can_update?).to eq(false) } @@ -105,6 +106,7 @@ describe ProjectMemberPresenter do context 'and user cannot update_project_member' do before do allow(presenter).to receive(:can?).with(user, :update_project_member, presenter).and_return(false) + allow(presenter).to receive(:can?).with(user, :override_project_member, presenter).and_return(false) end it { expect(presenter.can_approve?).to eq(false) } |