(POOLER-73) Add spec tests for revert_vm_snapshot

Add spec tests for revert_vm_snapshot
This commit is contained in:
Glenn Sarti 2017-02-13 20:18:08 -08:00
parent e6be5bfb75
commit 713e202d68

View file

@ -939,6 +939,22 @@ EOT
end end
end end
describe '#revert_vm_snapshot' do
let(:vsphere) { double('vsphere') }
let(:snapshot_name) { 'snapshot' }
before do
expect(subject).not_to be_nil
end
it 'calls _create_vm_snapshot' do
expect(Thread).to receive(:new).and_yield
expect(subject).to receive(:_revert_vm_snapshot).with(vm, snapshot_name, vsphere)
subject.revert_vm_snapshot(vm, snapshot_name, vsphere)
end
end
describe "#get_vm_host_info" do describe "#get_vm_host_info" do
before do before do
expect(subject).not_to be_nil expect(subject).not_to be_nil