diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 06:09:13 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 06:09:13 +0300 |
commit | ea99abb145ed193c2ac5d19efbff3b8990a54c9c (patch) | |
tree | c4f3870175c3334d0842eb429b5395a7845c2528 /spec/controllers | |
parent | a9104a50136e485c8dda7af37106332f9010a1e8 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/groups/boards_controller_spec.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/spec/controllers/groups/boards_controller_spec.rb b/spec/controllers/groups/boards_controller_spec.rb index 79edfd69429..acfa8bc9354 100644 --- a/spec/controllers/groups/boards_controller_spec.rb +++ b/spec/controllers/groups/boards_controller_spec.rb @@ -27,7 +27,8 @@ describe Groups::BoardsController do context 'with unauthorized user' do before do allow(Ability).to receive(:allowed?).with(user, :read_cross_project, :global).and_return(true) - allow(Ability).to receive(:allowed?).with(user, :read_group, group).and_return(false) + allow(Ability).to receive(:allowed?).with(user, :read_group, group).and_return(true) + allow(Ability).to receive(:allowed?).with(user, :read_board, group).and_return(false) end it 'returns a not found 404 response' do @@ -70,7 +71,8 @@ describe Groups::BoardsController do context 'with unauthorized user' do before do allow(Ability).to receive(:allowed?).with(user, :read_cross_project, :global).and_return(true) - allow(Ability).to receive(:allowed?).with(user, :read_group, group).and_return(false) + allow(Ability).to receive(:allowed?).with(user, :read_group, group).and_return(true) + allow(Ability).to receive(:allowed?).with(user, :read_board, group).and_return(false) end it 'returns a not found 404 response' do @@ -105,7 +107,8 @@ describe Groups::BoardsController do context 'with unauthorized user' do before do allow(Ability).to receive(:allowed?).with(user, :read_cross_project, :global).and_return(true) - allow(Ability).to receive(:allowed?).with(user, :read_group, group).and_return(false) + allow(Ability).to receive(:allowed?).with(user, :read_group, group).and_return(true) + allow(Ability).to receive(:allowed?).with(user, :read_board, group).and_return(false) end it 'returns a not found 404 response' do @@ -142,6 +145,7 @@ describe Groups::BoardsController do context 'with unauthorized user' do before do allow(Ability).to receive(:allowed?).with(user, :read_cross_project, :global).and_return(true) + allow(Ability).to receive(:allowed?).with(user, :read_group, group).and_return(true) allow(Ability).to receive(:allowed?).with(user, :read_group, group).and_return(false) end |