2010-03-28 20:04:38 -04:00
|
|
|
Shindo.tests('Slicehost#get_flavor', 'slicehost') do
|
|
|
|
tests('success') do
|
|
|
|
|
2010-04-05 01:11:28 -04:00
|
|
|
before do
|
2010-03-28 20:04:38 -04:00
|
|
|
@data = Slicehost[:slices].get_flavor(1).body
|
2010-04-05 01:11:28 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
test('has proper output format') do
|
2010-05-06 00:40:21 -04:00
|
|
|
has_format(@data, Slicehost::Formats::FLAVOR)
|
2010-03-28 20:04:38 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
|
|
|
test('raises Forbidden error if flavor does not exist') do
|
2010-05-06 00:40:21 -04:00
|
|
|
has_error(Excon::Errors::Forbidden) do
|
2010-03-28 20:04:38 -04:00
|
|
|
Slicehost[:slices].get_flavor(0)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|