1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/bluebox/requests/compute/location_tests.rb
2012-02-16 18:48:50 -08:00

32 lines
No EOL
858 B
Ruby

Shindo.tests('Fog::Compute[:bluebox] | location requests', ['bluebox']) do
@location_format = {
'id' => String,
'description' => String
}
tests('success') do
@location_id = compute_providers[:bluebox][:server_attributes][:location_id]
tests("get_location('#{@product_id}')").formats(@location_format) do
pending if Fog.mocking?
Fog::Compute[:bluebox].get_location(@location_id).body
end
tests("get_locations").formats([@location_format]) do
pending if Fog.mocking?
Fog::Compute[:bluebox].get_locations.body
end
end
tests('failure') do
tests("get_location('00000000-0000-0000-0000-000000000000')").raises(Fog::Compute::Bluebox::NotFound) do
pending if Fog.mocking?
Fog::Compute[:bluebox].get_location('00000000-0000-0000-0000-000000000000')
end
end
end