Sha256: 0c17bca2ba3146c4461ccb2406b7c37efd455eac80ba0642a549bc8f160087cd
Contents?: true
Size: 1011 Bytes
Versions: 14
Compression:
Stored size: 1011 Bytes
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for Set Connection Shared Key Request class TestResetConnectionSharedKey < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) @network_client = @service.instance_variable_get(:@network_client) @gateway_connections = @network_client.virtual_network_gateway_connections end def test_reset_connection_shared_key_success @gateway_connections.stub :reset_shared_key, nil do assert_equal @service.reset_connection_shared_key('fog-test-rg', 'fog-test-gateway-connection', '20'), true end end def test_reset_connection_shared_key_failure response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) } @gateway_connections.stub :reset_shared_key, response do assert_raises(MsRestAzure::AzureOperationError) { @service.reset_connection_shared_key('fog-test-rg', 'fog-test-gateway-connection', '20') } end end end
Version data entries
14 entries across 14 versions & 2 rubygems