diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-28 21:08:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-28 21:08:35 +0300 |
commit | 6315ed9630fb1c6ade3114beb762cd1568d79219 (patch) | |
tree | 2a5d31936d09c14420c8f4c8bd752e268f0eb19f /spec/lib/gitlab/git_access_spec.rb | |
parent | fedf978f9aa1909ed7bb3fad767ad120a1c6bd7b (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/git_access_spec.rb')
-rw-r--r-- | spec/lib/gitlab/git_access_spec.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index 36bde9de12d..231bcb4150c 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -75,6 +75,32 @@ describe Gitlab::GitAccess do end end + describe '#check_namespace!' do + context 'when namespace exists' do + before do + project.add_maintainer(user) + end + + it 'allows push and pull access' do + aggregate_failures do + expect { push_access_check }.not_to raise_error + expect { pull_access_check }.not_to raise_error + end + end + end + + context 'when namespace does not exist' do + let(:namespace_path) { nil } + + it 'does not allow push and pull access' do + aggregate_failures do + expect { push_access_check }.to raise_not_found + expect { pull_access_check }.to raise_not_found + end + end + end + end + describe '#check_project_accessibility!' do context 'when the project exists' do context 'when actor exists' do |