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

32 lines
635 B
Ruby
Raw Normal View History

2010-09-09 17:50:38 -07:00
Shindo.tests('Slicehost::Compute | image requests', ['slicehost']) do
2010-05-31 21:39:17 -07:00
@image_format = {
'id' => Integer,
'name' => String
}
tests('success') do
tests('#get_image(19)').formats(@image_format) do
pending if Fog.mocking?
2010-09-09 17:50:38 -07:00
Slicehost[:compute].get_image(19).body
2010-05-31 21:39:17 -07:00
end
tests('#get_images').formats({ 'images' => [@image_format] }) do
pending if Fog.mocking?
2010-09-09 17:50:38 -07:00
Slicehost[:compute].get_images.body
2010-05-31 21:39:17 -07:00
end
end
tests('failure') do
tests('#get_image(0)').raises(Excon::Errors::Forbidden) do
pending if Fog.mocking?
2010-09-09 17:50:38 -07:00
Slicehost[:compute].get_image(0)
2010-05-31 21:39:17 -07:00
end
end
end