test/api_stub/models/network/public_ip.rb in fog-azure-rm-0.0.4 vs test/api_stub/models/network/public_ip.rb in fog-azure-rm-0.0.5

- old
+ new

@@ -1,13 +1,13 @@ module ApiStub module Models module Network class PublicIp - def self.create_public_ip_response - subnet = '{ + def self.create_public_ip_response(network_client) + public_ip = '{ "name": "fog-test-public-ip", - "id": "/subscriptions/{guid}/resourceGroups/fog-test-rg/Microsoft.Network/publicIpAddresses/fog-test-public-ip", + "id": "/subscriptions/{guid}/resourceGroups/fog-test-rg/providers/Microsoft.Network/publicIpAddresses/fog-test-public-ip", "location": "West US", "tags": { "key": "value" }, "etag": "W/\"00000000-0000-0000-0000-000000000000\"", @@ -25,10 +25,11 @@ "fqdn": "mylabel.northus.cloudapp.azure.com.", "reverseFqdn": "contoso.com." } } }' - JSON.parse(subnet) + public_ip_mapper = Azure::ARM::Network::Models::PublicIPAddress.mapper + network_client.deserialize(public_ip_mapper, JSON.load(public_ip), 'result.body') end end end end end