summaryrefslogtreecommitdiff
path: root/spec/lib/backup
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 12:09:12 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-16 12:09:12 +0000
commitcbfe03ae04a52d9825ff7cbeccdfe5d313adf6a2 (patch)
treee4879b35d019d3bbba1689f3ac4c48b81bf7b451 /spec/lib/backup
parent3fd97b4bba24ca412112aad025a38a32c7a6cf8c (diff)
downloadgitlab-ce-cbfe03ae04a52d9825ff7cbeccdfe5d313adf6a2.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/backup')
-rw-r--r--spec/lib/backup/repository_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/backup/repository_spec.rb b/spec/lib/backup/repository_spec.rb
index 2ac1b0d2583..e0afa256581 100644
--- a/spec/lib/backup/repository_spec.rb
+++ b/spec/lib/backup/repository_spec.rb
@@ -50,9 +50,9 @@ describe Backup::Repository do
describe 'command failure' do
before do
- allow_next_instance_of(Gitlab::Shell) do |instance|
- allow(instance).to receive(:create_repository).and_return(false)
- end
+ # Allow us to set expectations on the project directly
+ expect(Project).to receive(:find_each).and_yield(project)
+ expect(project.repository).to receive(:create_repository) { raise 'Fail in tests' }
end
context 'hashed storage' do