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

53 lines
1.2 KiB
Ruby
Raw Normal View History

Shindo.tests('Fog::Compute[:voxel] | image requests', ['voxel']) do
2011-02-20 14:39:37 -05:00
@images_format = {
'images' => [{
'id' => Integer,
'summary' => String
}],
'stat' => String
}
2011-02-23 18:00:56 -05:00
2011-02-20 14:39:37 -05:00
@image_format = {
'images' => [{
'description' => String,
'id' => Integer,
'filesystem' => {
'size' => Integer,
'type' => String,
'units' => String,
},
'operating_system' => {
'admin_username' => String,
'architecture' => Integer,
'family' => String,
'product_family' => String,
'product_version' => String,
'version' => String
},
'summary' => String
}],
'stat' => String
2011-02-20 14:39:37 -05:00
}
tests('success') do
2011-02-23 18:00:56 -05:00
tests('#images_list').formats(@images_format) do
pending if Fog.mocking?
Fog::Compute[:voxel].images_list.body
2011-02-20 14:39:37 -05:00
end
tests('#images_list(1)').formats(@image_format) do
2011-02-23 18:00:56 -05:00
pending if Fog.mocking?
Fog::Compute[:voxel].images_list(1).body
2011-02-20 14:39:37 -05:00
end
end
tests('failure') do
tests('#images_list(0)').raises(Fog::Compute::Voxel::Error) do
2011-02-23 18:00:56 -05:00
pending if Fog.mocking?
Fog::Compute[:voxel].images_list(0).body
2011-02-20 14:39:37 -05:00
end
end
end