test/models/network/test_network_interfaces.rb in fog-azure-rm-0.1.2 vs test/models/network/test_network_interfaces.rb in fog-azure-rm-0.2.0
- old
+ new
@@ -9,11 +9,12 @@
end
def test_collection_methods
methods = [
:all,
- :get
+ :get,
+ :check_network_interface_exists
]
methods.each do |method|
assert_respond_to @network_interfaces, method
end
end
@@ -35,8 +36,20 @@
def test_get_method_response
response = ApiStub::Models::Network::NetworkInterface.create_network_interface_response(@network_client)
@service.stub :get_network_interface, response do
assert_instance_of Fog::Network::AzureRM::NetworkInterface, @network_interfaces.get('fog-test-rg', 'fog-test-network-interface')
+ end
+ end
+
+ def test_check_network_interface_exists_true_response
+ @service.stub :check_network_interface_exists, true do
+ assert @network_interfaces.check_network_interface_exists('fog-test-rg', 'fog-test-network-interface')
+ end
+ end
+
+ def test_check_network_interface_exists_false_response
+ @service.stub :check_network_interface_exists, false do
+ assert !@network_interfaces.check_network_interface_exists('fog-test-rg', 'fog-test-network-interface')
end
end
end