1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/dns/requests/rackspace/dns_tests.rb

44 lines
1 KiB
Ruby
Raw Normal View History

2011-08-16 20:59:57 -04:00
Shindo.tests('Fog::DNS[:rackspace] | DNS requests', ['rackspace', 'dns']) do
@domain = ''
@new_zones = []
@new_records =[]
@service = Fog::DNS[:rackspace]
LIST_DOMAIN_FORMAT = {
'domains' => [
{
'name' => String,
'id' => Integer,
'accountId' => Integer,
'updated' => String,
'created' => String
}
],
'totalEntries' => Integer,
'links' => [
{
'rel' => String,
'href' => String
}
]
}
tests( 'success') do
tests('list_domains').formats(LIST_DOMAIN_FORMAT) do
@service.list_domains.body
end
tests('list_domains :limit => 5, :offset => 10, :domain => "hartsock" --> All possible attributes').formats(LIST_DOMAIN_FORMAT) do
@service.list_domains(:limit => 5, :offset => 10, :domain => 'hartsock').body
end
2011-08-16 20:59:57 -04:00
end
tests( 'failure') do
tests('list_domains :limit => 5, :offset => 8').raises(Fog::Rackspace::Errors::BadRequest) do
@service.list_domains :limit => 5, :offset => 8
end
2011-08-16 20:59:57 -04:00
end
end