diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-01-15 00:35:51 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-01-15 00:35:51 +0300 |
commit | 28c23d99c11a347ed9bd23b8778d5aeb44f3bf43 (patch) | |
tree | 86f702bb9ceee092fd537da2793504cdbf98dc82 /spec | |
parent | bf8e174f0ae21b320c17b5a8f8d45aefcfef9520 (diff) | |
parent | 0b5b3ec3a432842bc53c7226c6db98e484aeee50 (diff) |
Merge branch '25018-gitlab-checks-changeaccess-looks-for-user-permissions-that-don-t-exist' into 'master'
Resolve "`Gitlab::Checks::ChangeAccess` looks for user permissions that don't exist"
Closes #25018
See merge request !8551
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/checks/change_access_spec.rb | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/spec/lib/gitlab/checks/change_access_spec.rb b/spec/lib/gitlab/checks/change_access_spec.rb index 39069b49978..98effecdbbc 100644 --- a/spec/lib/gitlab/checks/change_access_spec.rb +++ b/spec/lib/gitlab/checks/change_access_spec.rb @@ -56,7 +56,6 @@ describe Gitlab::Checks::ChangeAccess, lib: true do it 'returns an error if the user is not allowed to do forced pushes to protected branches' do expect(Gitlab::Checks::ForcePush).to receive(:force_push?).and_return(true) - expect(user_access).to receive(:can_do_action?).with(:force_push_code_to_protected_branches).and_return(false) expect(subject.status).to be(false) expect(subject.message).to eq('You are not allowed to force push code to a protected branch on this project.') @@ -88,8 +87,6 @@ describe Gitlab::Checks::ChangeAccess, lib: true do end it 'returns an error if the user is not allowed to delete protected branches' do - expect(user_access).to receive(:can_do_action?).with(:remove_protected_branches).and_return(false) - expect(subject.status).to be(false) expect(subject.message).to eq('You are not allowed to delete protected branches from this project.') end |