Sha256: 41af32aac7db6b7b0dbfe6aff199cce09aab26e8b72d4a9109920cecf31d68ca
Contents?: true
Size: 913 Bytes
Versions: 33
Compression:
Stored size: 913 Bytes
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for Delete Subnet Request class TestDeleteSubnet < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) @network_client = @service.instance_variable_get(:@network_client) @subnets = @network_client.subnets end def test_delete_subnet_success response = ApiStub::Requests::Network::Subnet.delete_subnet_response @subnets.stub :delete, response do assert @service.delete_subnet('fog-test-rg', 'fog-test-subnet', 'fog-test-virtual-network') end end def test_delete_subnet_failure response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) } @subnets.stub :delete, response do assert_raises(RuntimeError) { @service.delete_subnet('fog-test-rg', 'fog-test-subnet', 'fog-test-virtual-network') } end end end
Version data entries
33 entries across 33 versions & 4 rubygems