From 61265b9f01c7db3d4f6e1266d165b1c85be7b9e7 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Mon, 5 Oct 2020 15:08:56 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- spec/lib/gitlab/git_access_spec.rb | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'spec/lib/gitlab/git_access_spec.rb') 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 -- cgit v1.2.3