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

34 lines
713 B
Ruby
Raw Normal View History

Shindo.tests('Fog::Compute[:slicehost] | flavor requests', ['slicehost']) do
2010-06-01 00:39:17 -04:00
@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
2010-06-01 00:39:17 -04:00
end
tests('#get_flavors').formats({ 'flavors' => [@flavor_format] }) do
pending if Fog.mocking?
Fog::Compute[:slicehost].get_flavors.body
2010-06-01 00:39:17 -04:00
end
end
tests('failure') do
tests('#get_flavor(0)').raises(Excon::Errors::Forbidden) do
pending if Fog.mocking?
Fog::Compute[:slicehost].get_flavor(0)
2010-06-01 00:39:17 -04:00
end
end
end