Skip to content

Commit

Permalink
[rackspace|block_storage] fixing broken volume type tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Rames committed Jun 26, 2013
1 parent 1266129 commit 604b4a6
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions tests/rackspace/requests/block_storage/volume_type_tests.rb
@@ -1,27 +1,20 @@
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

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
Expand Down

0 comments on commit 604b4a6

Please sign in to comment.