Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/backup/manager_spec.rb')
-rw-r--r--spec/lib/backup/manager_spec.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/spec/lib/backup/manager_spec.rb b/spec/lib/backup/manager_spec.rb
index cee299522ce..b86e92d5969 100644
--- a/spec/lib/backup/manager_spec.rb
+++ b/spec/lib/backup/manager_spec.rb
@@ -319,18 +319,21 @@ describe Backup::Manager do
context 'when there is a non-tarred backup in the directory' do
before do
- allow(Dir).to receieve(:glob).and_return(
+ allow(Dir).to receive(:glob).and_return(
[
'backup_information.yml'
]
)
+ allow(File).to receive(:exist?).and_return(true)
+ end
+
+ it 'selects the non-tarred backup to restore from' do
+ expect(Kernel).not_to receive(:system)
- it 'selects the non-tarred backup to restore from' do
- expect { subject.unpack }.to output.to_stdout
- expect(progress).to have_received(:puts)
- .with(a_string_matching('Non tarred backup found '))
- expect(Kernel).not_to receive(:system)
- end
+ subject.unpack
+
+ expect(progress).to have_received(:puts)
+ .with(a_string_matching('Non tarred backup found '))
end
end
end