test/api_stub/requests/sql/firewall_rule.rb in fog-azure-rm-0.1.2 vs test/api_stub/requests/sql/firewall_rule.rb in fog-azure-rm-0.2.0

- old
+ new

@@ -1,25 +1,27 @@ module ApiStub module Requests module Sql # Mock class for Firewall Rule class FirewallRule - def self.create_firewall_rule_response - '{ + def self.create_firewall_rule_response(sql_manager_client) + body = '{ "id": "{uri-of-firewall-rule}", "name": "{rule-name}", "type": "{rule-type}", "location": "{server-location}", "properties": { "startIpAddress": "{start-ip-address}", "endIpAddress": "{end-ip-address}" } }' + firewall_mapper = Azure::ARM::SQL::Models::ServerFirewallRule.mapper + sql_manager_client.deserialize(firewall_mapper, Fog::JSON.decode(body), 'result.body') end - def self.list_firewall_rule_response - '{ + def self.list_firewall_rule_response(sql_manager_client) + body = '{ "value": [{ "id": "{uri-of-firewall-rule}", "name": "{rule-name}", "type": "{rule-type}", "location": "{server-location}", @@ -27,9 +29,11 @@ "startIpAddress": "{start-ip-address}", "endIpAddress": "{end-ip-address}" } }] }' + firewall_mapper = Azure::ARM::SQL::Models::ServerFirewallRuleListResult.mapper + sql_manager_client.deserialize(firewall_mapper, Fog::JSON.decode(body), 'result.body') end def self.firewall_rule_hash { resource_group: 'resource_group',