Sha256: 128261566147efb1070bd5b76d465b73863e3a381a67b1e6f7e5f15fe1e7e5af

Contents?: true

Size: 927 Bytes

Versions: 6

Compression:

Stored size: 927 Bytes

Contents

require File.expand_path '../../test_helper', __dir__

# Test class for Delete Express Route Circuit Request
class TestDeleteExpressRouteCircuit < Minitest::Test
  def setup
    @service = Fog::Network::AzureRM.new(credentials)
    @network_client = @service.instance_variable_get(:@network_client)
    @circuit = @network_client.express_route_circuits
  end

  def test_delete_express_route_circuit_success
    response = true
    @circuit.stub :delete, response do
      assert @service.delete_express_route_circuit('fogRM-rg', 'testCircuit'), response
    end
  end

  def test_delete_express_route_circuit_failure
    response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) }
    @circuit.stub :delete, response do
      assert_raises(RuntimeError) { @service.delete_express_route_circuit('fogRM-rg', 'testCircuit') }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.1 test/requests/network/test_delete_express_route_circuit.rb
fog-azure-rm-0.1.0 test/requests/network/test_delete_express_route_circuit.rb
fog-azure-rm-0.0.9 test/requests/network/test_delete_express_route_circuit.rb
fog-azure-rm-0.0.8 test/requests/network/test_delete_express_route_circuit.rb
fog-azure-rm-0.0.6 test/requests/network/test_delete_express_route_circuit.rb
fog-azure-rm-0.0.5 test/requests/network/test_delete_express_route_circuit.rb