Sha256: ba7befe7f054ceffd1fe21b3757a4d2fd2f2d6d4ab9e79602594e5b761e74cf9
Contents?: true
Size: 1.02 KB
Versions: 6
Compression:
Stored size: 1.02 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for Delete Network Interface Request class TestDeleteNetworkInterface < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) network_client = @service.instance_variable_get(:@network_client) @network_interfaces = network_client.network_interfaces end def test_delete_network_interface_success response = ApiStub::Requests::Network::NetworkInterface.delete_network_interface_response @network_interfaces.stub :delete, @promise do assert @service.delete_network_interface('fog-test-rg', 'fog-test-network-interface'), response end end def test_delete_network_interface_failure response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) } @network_interfaces.stub :delete, response do assert_raises(RuntimeError) { @service.delete_network_interface('fog-test-rg', 'fog-test-network-interface') } end end end
Version data entries
6 entries across 6 versions & 1 rubygems