Sha256: 5f321a65436502a6831dabe163daa4a115366597c3dc8056bff1be0c1d666032
Contents?: true
Size: 903 Bytes
Versions: 33
Compression:
Stored size: 903 Bytes
Contents
require File.expand_path '../../test_helper', __dir__ # Test class for Delete Public Ip Request class TestDeletePublicIp < Minitest::Test def setup @service = Fog::Network::AzureRM.new(credentials) network_client = @service.instance_variable_get(:@network_client) @public_ips = network_client.public_ipaddresses end def test_delete_public_ip_success response = ApiStub::Requests::Network::PublicIp.delete_public_ip_response @public_ips.stub :delete, response do assert @service.delete_public_ip('fog-test-rg', 'fog-test-public-ip') end end def test_delete_public_ip_failure response = proc { raise MsRestAzure::AzureOperationError.new(nil, nil, 'error' => { 'message' => 'mocked exception' }) } @public_ips.stub :delete, response do assert_raises(RuntimeError) { @service.delete_public_ip('fog-test-rg', 'fog-test-public-ip') } end end end
Version data entries
33 entries across 33 versions & 4 rubygems