Sha256: 41513da5b9177061b2d8b0e33b7c9ed27548bd6c2f200e75d7fc070c746f219f
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for Delete Application Gateway Request class TestDeleteApplicationGateway < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) client = @service.instance_variable_get(:@network_client) @gateways = client.application_gateways @promise = Concurrent::Promise.execute do end end def test_delete_application_gateway_success response = true @promise.stub :value!, response do @gateways.stub :delete, @promise do assert @service.delete_application_gateway('fogRM-rg', 'gateway'), response end end end def test_delete_application_gateway_failure response = -> { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) } @promise.stub :value!, response do @gateways.stub :delete, @promise do assert_raises(RuntimeError) { @service.delete_application_gateway('fogRM-rg', 'gateway') } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-azure-rm-0.0.4 | test/requests/network/test_delete_application_gateway.rb |