1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/digitalocean/requests/compute/list_regions_tests.rb
Sergio Rubio f11926a5a2 [digitalocean|compute] initial release
DigitalOcean Compute Service Provider.
See https://www.digitalocean.com/api
2013-03-31 22:16:08 +02:00

23 lines
523 B
Ruby

Shindo.tests('Fog::Compute[:digitalocean] | list_regions request', ['digitalocean', 'compute']) do
# {"id":2,"name":"Amsterdam 1"}
@region_format = {
'id' => Integer,
'name' => String,
}
tests('success') do
tests('#list_regions') do
regions = Fog::Compute[:digitalocean].list_regions.body
test 'returns a Hash' do
regions.is_a? Hash
end
tests('region').formats(@region_format, false) do
regions['regions'].first
end
end
end
end