test/models/compute/test_server.rb in fog-azure-rm-0.3.7 vs test/models/compute/test_server.rb in fog-azure-rm-0.3.8
- old
+ new
@@ -67,11 +67,13 @@
end
def test_save_method_response_for_linux_vm
response = ApiStub::Models::Compute::Server.create_linux_virtual_machine_response(@compute_client)
@service.stub :create_virtual_machine, response do
- assert_instance_of Fog::Compute::AzureRM::Server, @server.save
+ @service.stub :get_virtual_machine, response do
+ assert_instance_of Fog::Compute::AzureRM::Server, @server.save
+ end
end
# Async
async_response = Concurrent::Promise.execute { 10 }
@service.stub :create_virtual_machine, async_response do
@@ -80,11 +82,13 @@
end
def test_save_method_response_for_windows_vm
response = ApiStub::Models::Compute::Server.create_windows_virtual_machine_response(@compute_client)
@service.stub :create_virtual_machine, response do
- assert_instance_of Fog::Compute::AzureRM::Server, @server.save
- refute @server.save.disable_password_authentication
+ @service.stub :get_virtual_machine, response do
+ assert_instance_of Fog::Compute::AzureRM::Server, @server.save
+ refute @server.save.disable_password_authentication
+ end
end
end
def test_destroy_method_response
@service.stub :delete_virtual_machine, true do