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

24 lines
523 B
Ruby
Raw Normal View History

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