1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/opennebula/models/compute/flavors_tests.rb
2015-05-07 10:31:13 +02:00

16 lines
723 B
Ruby

Shindo.tests('Fog::Compute[:opennebula] | flavors collection', ['opennebula']) do
flavors = Fog::Compute[:opennebula].flavors
tests('The flavors collection should') do
test('should be a kind of Fog::Compute::OpenNebula::Flavors') { flavors.kind_of? Fog::Compute::OpenNebula::Flavors }
tests('should be able to reload itself').succeeds { flavors.reload }
tests('should be able to get models') do
tests('all').succeeds { flavors.all }
tests('by instance id').succeeds { flavors.get flavors.first.id }
tests('by name').succeeds { flavors.get_by_name "fogtest" }
tests('by filter').succeeds { flavors.get_by_filter ({:name => "fogtest", :id => flavors.first.id }) }
end
end
end