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

42 lines
1,013 B
Ruby
Raw Normal View History

Shindo.tests('Fog::Compute[:linode] | linodeplans requests', ['linode']) do
2010-07-17 23:35:08 -04:00
2010-09-09 20:50:38 -04:00
@linodeplans_format = Linode::Compute::Formats::BASIC.merge({
'DATA' => [{
2010-07-17 23:35:08 -04:00
'AVAIL' => {
'2' => Integer,
'3' => Integer,
'4' => Integer,
'6' => Integer,
'7' => Integer,
'8' => Integer
2010-07-17 23:35:08 -04:00
},
'DISK' => Integer,
'PLANID' => Integer,
'PRICE' => Float,
'RAM' => Integer,
'LABEL' => String,
'XFER' => Integer,
'CORES' => Integer
2010-07-17 23:35:08 -04:00
}]
})
tests('success') do
@linodeplan_id = nil
tests('#avail_linodeplans').formats(@linodeplans_format) do
pending if Fog.mocking?
data = Fog::Compute[:linode].avail_linodeplans.body
2010-07-17 23:35:08 -04:00
@linodeplan_id = data['DATA'].first['PLANID']
data
end
tests("#avail_linodeplans(#{@linodeplan_id})").formats(@linodeplans_format) do
pending if Fog.mocking?
Fog::Compute[:linode].avail_linodeplans(@linodeplan_id).body
2010-07-17 23:35:08 -04:00
end
end
end