Skip to content

Commit cebefd9

Browse files
Stub snapshot rename support in request specs
1 parent 2a6568b commit cebefd9

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎spec/requests/snapshots_spec.rb‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@
219219
vm = FactoryBot.create(:vm_vmware, :name => "Alice's VM", :host => host, :ext_management_system => ems)
220220
snapshot = FactoryBot.create(:snapshot, :name => "Alice's snapshot", :vm_or_template => vm)
221221

222+
stub_supports(vm, :rename_snapshot)
223+
222224
post(api_vm_snapshot_url(nil, vm, snapshot), :params => {:action => "rename_snapshot", :name => "renamed snapshot"})
223225

224226
expected = {
@@ -581,6 +583,8 @@
581583
instance = FactoryBot.create(:vm_openstack, :name => "Alice's Instance", :ext_management_system => ems, :host => host)
582584
snapshot = FactoryBot.create(:snapshot, :name => "Alice's snapshot", :vm_or_template => instance)
583585

586+
stub_supports(instance, :rename_snapshot)
587+
584588
post(api_instance_snapshot_url(nil, instance, snapshot), :params => {:action => "rename_snapshot", :name => "renamed snapshot"})
585589

586590
expected = {

0 commit comments

Comments
 (0)