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/image_tests.rb
2010-05-31 21:39:17 -07:00

28 lines
533 B
Ruby

Shindo.tests('Slicehost | image requests', ['slicehost']) do
@image_format = {
'id' => Integer,
'name' => String
}
tests('success') do
tests('#get_image(19)').formats(@image_format) do
Slicehost[:slices].get_image(19).body
end
tests('#get_images').formats({ 'images' => [@image_format] }) do
Slicehost[:slices].get_images.body
end
end
tests('failure') do
tests('#get_image(0)').raises(Excon::Errors::Forbidden) do
Slicehost[:slices].get_image(0)
end
end
end