diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 15:08:05 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-06 15:08:05 +0000 |
commit | f78257cbddd711e18cbce93ad740a4aa0acac347 (patch) | |
tree | 7f018abe3ce1c0010879cc480f348a35e616fabb /spec/lib/backup | |
parent | f500600a43b531e2e7a5858b74bd35312b02c349 (diff) | |
download | gitlab-ce-f78257cbddd711e18cbce93ad740a4aa0acac347.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/backup')
-rw-r--r-- | spec/lib/backup/manager_spec.rb | 17 |
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 |