mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
Fixing parsing of zone.records.get(id) so that it parses a single record properly rather than attempting to parse a list of records improperly. Fixing tests to match this (expected) behavior rather than work-around the broken way.
This commit is contained in:
parent
c8c4324549
commit
21e80718a5
2 changed files with 3 additions and 4 deletions
|
@ -21,7 +21,7 @@ module Fog
|
|||
request(
|
||||
:expects => 200,
|
||||
:method => 'GET',
|
||||
:parser => Fog::Parsers::DNS::Slicehost::GetRecords.new,
|
||||
:parser => Fog::Parsers::DNS::Slicehost::GetRecord.new,
|
||||
:path => "records/#{record_id}.xml"
|
||||
)
|
||||
end
|
||||
|
|
|
@ -183,7 +183,7 @@ Shindo.tests('Fog::DNS[:slicehost] | DNS requests', ['slicehost', 'dns']) do
|
|||
response = Fog::DNS[:slicehost].get_record(@record_id)
|
||||
if response.status == 200
|
||||
mail_domain = 'mail.' + @domain
|
||||
record = response.body['records'][0]
|
||||
record = response.body
|
||||
if (record['record_type'] == 'MX') and (record['name'] == @domain) and
|
||||
(record['value'] == mail_domain) and (record['ttl'] == 3600) and (record['active'] == 'N') and
|
||||
(record['aux'] == "10")
|
||||
|
@ -247,8 +247,7 @@ Shindo.tests('Fog::DNS[:slicehost] | DNS requests', ['slicehost', 'dns']) do
|
|||
|
||||
mail_domain = 'mail.' + @domain
|
||||
|
||||
records = Fog::DNS[:slicehost].get_record(specific_record['id']).body["records"]
|
||||
record = records[0]
|
||||
record = Fog::DNS[:slicehost].get_record(specific_record['id']).body
|
||||
|
||||
if (record['record_type'] == 'MX') and (record['name'] == @domain) and
|
||||
(record['value'] == mail_domain) and (record['ttl'] == 7200) and (record['active'] == 'N') and
|
||||
|
|
Loading…
Add table
Reference in a new issue