diff options
author | Mark Chao <mchao@gitlab.com> | 2018-07-11 17:36:08 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2018-07-11 17:36:08 +0300 |
commit | a63bce1a4b55bc6cbafb9dec12d33028521489e9 (patch) | |
tree | ee9466e6b06536a65d4e851f4096679c6f968d1e /spec/lib/gitlab/git_access_spec.rb | |
parent | 1bf54e092783f7ad388225d32ab79ac1e845559c (diff) |
Resolve "Rename the `Master` role to `Maintainer`" Backend
Diffstat (limited to 'spec/lib/gitlab/git_access_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git_access_spec.rb | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index 6d11efb42c8..832db2bd906 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -40,7 +40,7 @@ describe Gitlab::GitAccess do before do disable_protocol('http') - project.add_master(user) + project.add_maintainer(user) end it 'blocks http push and pull' do @@ -105,7 +105,7 @@ describe Gitlab::GitAccess do context 'when actor is a User' do context 'when the User can read the project' do before do - project.add_master(user) + project.add_maintainer(user) end it 'allows push and pull access' do @@ -246,7 +246,7 @@ describe Gitlab::GitAccess do shared_examples '#check with a key that is not valid' do before do - project.add_master(user) + project.add_maintainer(user) end context 'key is too small' do @@ -299,7 +299,7 @@ describe Gitlab::GitAccess do describe '#add_project_moved_message!', :clean_gitlab_redis_shared_state do before do - project.add_master(user) + project.add_maintainer(user) end context 'when a redirect was not followed to find the project' do @@ -327,7 +327,7 @@ describe Gitlab::GitAccess do describe '#check_authentication_abilities!' do before do - project.add_master(user) + project.add_maintainer(user) end context 'when download' do @@ -373,7 +373,7 @@ describe Gitlab::GitAccess do describe '#check_command_disabled!' do before do - project.add_master(user) + project.add_maintainer(user) end context 'over http' do @@ -521,8 +521,8 @@ describe Gitlab::GitAccess do end describe '#check_download_access!' do - it 'allows masters to pull' do - project.add_master(user) + it 'allows maintainers to pull' do + project.add_maintainer(user) expect { pull_access_check }.not_to raise_error end @@ -534,7 +534,7 @@ describe Gitlab::GitAccess do end it 'disallows blocked users to pull' do - project.add_master(user) + project.add_maintainer(user) user.block expect { pull_access_check }.to raise_unauthorized('Your account has been blocked.') @@ -805,7 +805,7 @@ describe Gitlab::GitAccess do merge_into_protected_branch: true }, - master: { + maintainer: { push_new_branch: true, push_master: true, push_protected_branch: true, @@ -910,7 +910,7 @@ describe Gitlab::GitAccess do end run_permission_checks(permissions_matrix.deep_merge(developer: { push_protected_branch: false, push_all: false, merge_into_protected_branch: false }, - master: { push_protected_branch: false, push_all: false, merge_into_protected_branch: false }, + maintainer: { push_protected_branch: false, push_all: false, merge_into_protected_branch: false }, admin: { push_protected_branch: false, push_all: false, merge_into_protected_branch: false })) end end @@ -982,7 +982,7 @@ describe Gitlab::GitAccess do let(:project) { create(:project, :repository, :read_only) } it 'denies push access' do - project.add_master(user) + project.add_maintainer(user) expect { push_access_check }.to raise_unauthorized('The repository is temporarily read-only. Please try again later.') end @@ -1112,9 +1112,9 @@ describe Gitlab::GitAccess do it_behaves_like 'access after accepting terms' end - describe 'as a master of the project' do + describe 'as a maintainer of the project' do before do - project.add_master(user) + project.add_maintainer(user) end it_behaves_like 'access after accepting terms' |