diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-02-26 15:32:42 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2018-03-07 17:12:31 +0300 |
commit | b2ef83856de8c175d384688d09023d16dcfef0c6 (patch) | |
tree | 01802b6678de41951dbd035a25219e77d6b48cf7 /spec/lib/gitlab/checks | |
parent | 792ab0631c85098fbf92e727b77158fb9dae5219 (diff) |
Allow abilities on forks while MR is open
When an MR is created using `allow_maintainer_to_push`, we enable some
abilities while the MR is open.
This should allow every user with developer abilities on the target
project, to push to the source project.
Diffstat (limited to 'spec/lib/gitlab/checks')
-rw-r--r-- | spec/lib/gitlab/checks/change_access_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/gitlab/checks/change_access_spec.rb b/spec/lib/gitlab/checks/change_access_spec.rb index b49ddbfc780..2f173d2e75c 100644 --- a/spec/lib/gitlab/checks/change_access_spec.rb +++ b/spec/lib/gitlab/checks/change_access_spec.rb @@ -30,9 +30,9 @@ describe Gitlab::Checks::ChangeAccess do end end - context 'when the user is not allowed to push code' do + context 'when the user is not allowed to push to the repo' do it 'raises an error' do - expect(user_access).to receive(:can_do_action?).with(:push_code).and_return(false) + expect(user_access).to receive(:can_do_action?).with(:push_to_repo).and_return(false) expect { subject.exec }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'You are not allowed to push code to this project.') end @@ -42,7 +42,7 @@ describe Gitlab::Checks::ChangeAccess do let(:ref) { 'refs/tags/v1.0.0' } it 'raises an error if the user is not allowed to update tags' do - allow(user_access).to receive(:can_do_action?).with(:push_code).and_return(true) + allow(user_access).to receive(:can_do_action?).with(:push_to_repo).and_return(true) expect(user_access).to receive(:can_do_action?).with(:admin_project).and_return(false) expect { subject.exec }.to raise_error(Gitlab::GitAccess::UnauthorizedError, 'You are not allowed to change existing tags on this project.') |