diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 18:08:56 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-05 18:08:56 +0300 |
commit | 61265b9f01c7db3d4f6e1266d165b1c85be7b9e7 (patch) | |
tree | b6589df984e18e3b008a155c8d9ffcae75cf7c91 /spec/lib/gitlab/git_access_spec.rb | |
parent | 5460c19548d3d3d2ff764ceff05c2b72aa2d3a32 (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 | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/lib/gitlab/git_access_spec.rb b/spec/lib/gitlab/git_access_spec.rb index 85567ab2e55..3d60cc93bab 100644 --- a/spec/lib/gitlab/git_access_spec.rb +++ b/spec/lib/gitlab/git_access_spec.rb @@ -428,14 +428,12 @@ RSpec.describe Gitlab::GitAccess do end context 'when the project repository does not exist' do - it 'returns not found' do + before do project.add_guest(user) - repo = project.repository - Gitlab::GitalyClient::StorageSettings.allow_disk_access { FileUtils.rm_rf(repo.path) } - - # Sanity check for rm_rf - expect(repo.exists?).to eq(false) + allow(project.repository).to receive(:exists?).and_return(false) + end + it 'returns not found' do expect { pull_access_check }.to raise_error(Gitlab::GitAccess::NotFoundError, 'A repository for this project does not exist yet.') end end |