1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/slicehost/requests/get_flavor_tests.rb
2010-03-28 17:04:38 -07:00

23 lines
479 B
Ruby

Shindo.tests('Slicehost#get_flavor', 'slicehost') do
tests('success') do
test('has proper output format') do
@data = Slicehost[:slices].get_flavor(1).body
validate_data_format(@data, Slicehost::Formats::FLAVOR)
end
end
tests('failure') do
test('raises Forbidden error if flavor does not exist') do
begin
Slicehost[:slices].get_flavor(0)
false
rescue Excon::Errors::Forbidden
true
end
end
end
end