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

33 lines
713 B
Ruby

Shindo.tests('Fog::Compute[:slicehost] | flavor requests', ['slicehost']) do
@flavor_format = {
'id' => Integer,
'name' => String,
'price' => Integer,
'ram' => Integer
}
tests('success') do
tests('#get_flavor(1)').formats(@flavor_format) do
pending if Fog.mocking?
Fog::Compute[:slicehost].get_flavor(1).body
end
tests('#get_flavors').formats({ 'flavors' => [@flavor_format] }) do
pending if Fog.mocking?
Fog::Compute[:slicehost].get_flavors.body
end
end
tests('failure') do
tests('#get_flavor(0)').raises(Excon::Errors::Forbidden) do
pending if Fog.mocking?
Fog::Compute[:slicehost].get_flavor(0)
end
end
end