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

31 lines
728 B
Ruby

# coding: utf-8
Shindo.tests('Fog::Volume[:sakuracloud] | list_archives request', ['sakuracloud', 'volume']) do
@archive_format = {
'Index' => Integer,
'ID' => Integer,
'Name' => String,
'SizeMB' => Integer,
'Plan' => Hash
}
tests('success') do
tests('#list_archives') do
archives = volume_service.list_archives
test 'returns a Hash' do
archives.body.is_a? Hash
end
if Fog.mock?
tests('Archives').formats(@archive_format, false) do
archives.body['Archives'].first
end
else
returns(200) { archives.status }
returns(false) { archives.body.empty? }
end
end
end
end