1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace|block_storage] fixing broken volume type tests

This commit is contained in:
Kyle Rames 2013-06-26 09:27:43 -05:00
parent 1266129c66
commit 604b4a625f

View file

@ -1,15 +1,8 @@
Shindo.tests('Fog::Rackspace::BlockStorage | volume_type_tests', ['rackspace']) do
volume_type_format = {
'name' => String,
'extra_specs' => Hash
}
list_volume_type_format = {
'volume_types' => [volume_type_format.merge({ 'id' => Integer })]
}
get_volume_type_format = {
'volume_type' => volume_type_format.merge({ 'id' => String })
'extra_specs' => Hash,
'id' => String
}
service = Fog::Rackspace::BlockStorage.new
@ -17,11 +10,11 @@ Shindo.tests('Fog::Rackspace::BlockStorage | volume_type_tests', ['rackspace'])
tests('success') do
volume_type_id = service.volume_types.first.id
tests("#list_volume_types").formats(list_volume_type_format) do
tests("#list_volume_types").formats('volume_types' => [volume_type_format]) do
service.list_volume_types.body
end
tests("#get_volume_type(#{volume_type_id})").formats(get_volume_type_format) do
tests("#get_volume_type(#{volume_type_id})").formats('volume_type' => volume_type_format) do
service.get_volume_type(volume_type_id).body
end
end