From ad25ef1f0d7e85e2b9797f30721caab00f62dfc2 Mon Sep 17 00:00:00 2001 From: "Balasankar \"Balu\" C" Date: Mon, 15 Jan 2018 20:33:35 +0530 Subject: List available backups for restore --- spec/lib/backup/manager_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec') diff --git a/spec/lib/backup/manager_spec.rb b/spec/lib/backup/manager_spec.rb index b68301a066a..cd498177b81 100644 --- a/spec/lib/backup/manager_spec.rb +++ b/spec/lib/backup/manager_spec.rb @@ -194,6 +194,13 @@ describe Backup::Manager do ) end + it 'prints the list of available backups' do + expect(progress).to have_received(:puts) + .with(a_string_matching('1451606400_2016_01_01_1.2.3')) + expect(progress).to have_received(:puts) + .with(a_string_matching('1451520000_2015_12_31')) + end + it 'fails the operation and prints an error' do expect { subject.unpack }.to raise_error SystemExit expect(progress).to have_received(:puts) -- cgit v1.2.3