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

31 lines
664 B
Ruby
Raw Normal View History

2010-09-09 20:50:38 -04:00
Shindo.tests('AWS::Compute | region requests', ['aws']) do
@regions_format = {
'regionInfo' => [{
'regionEndpoint' => String,
'regionName' => String
}],
'requestId' => String
}
2010-05-23 17:25:20 -04:00
tests('success') do
tests("#describe_regions").formats(@regions_format) do
2010-09-09 20:50:38 -04:00
AWS[:compute].describe_regions.body
2010-05-23 17:25:20 -04:00
end
tests("#describe_regions('us-east-1')").formats(@regions_format) do
2010-09-09 20:50:38 -04:00
AWS[:compute].describe_regions('us-east-1').body
2010-05-23 17:25:20 -04:00
end
end
2010-05-23 17:25:20 -04:00
tests('failure') do
2010-09-09 20:50:38 -04:00
tests("#describe_regions('us-east-2')").raises(Fog::AWS::Compute::Error) do
AWS[:compute].describe_regions('us-east-2')
2010-05-23 17:25:20 -04:00
end
end
2010-05-23 17:25:20 -04:00
end