summaryrefslogtreecommitdiff
path: root/spec/controllers/groups
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 03:09:13 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 03:09:13 +0000
commitea99abb145ed193c2ac5d19efbff3b8990a54c9c (patch)
treec4f3870175c3334d0842eb429b5395a7845c2528 /spec/controllers/groups
parenta9104a50136e485c8dda7af37106332f9010a1e8 (diff)
downloadgitlab-ce-ea99abb145ed193c2ac5d19efbff3b8990a54c9c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/controllers/groups')
-rw-r--r--spec/controllers/groups/boards_controller_spec.rb10
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