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

29 lines
617 B
Ruby
Raw Permalink Normal View History

2011-12-02 13:27:44 -05:00
Shindo.tests('Fog::Compute[:ibm] | location requests', ['ibm']) do
2012-02-13 10:51:03 -05:00
2011-12-02 13:27:44 -05:00
@location_format = {
'state' => Integer,
'location' => String,
'capabilities' => Array,
'name' => String,
'id' => String,
'description' => String
}
2012-02-13 10:51:03 -05:00
2011-12-02 13:27:44 -05:00
@locations_format = {
'locations' => [ @location_format ]
}
tests('success') do
2012-02-13 10:51:03 -05:00
2011-12-02 13:27:44 -05:00
tests("#list_locations").formats(@locations_format) do
Fog::Compute[:ibm].list_locations.body
end
2012-02-13 10:51:03 -05:00
2011-12-02 13:27:44 -05:00
tests('#get_locations').formats(@location_format) do
2012-02-28 23:51:37 -05:00
Fog::Compute[:ibm].get_location('41').body
2011-12-02 13:27:44 -05:00
end
2012-02-13 10:51:03 -05:00
2011-12-02 13:27:44 -05:00
end
2012-02-13 10:51:03 -05:00
end