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

29 lines
982 B
Ruby

require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
Shindo.tests("Compute::VcloudDirector | vapp_templates", ['vclouddirector', 'all']) do
# unless there is atleast one vapp we cannot run these tests
pending if vdc.vapp_templates.empty?
vapp_templates = vdc.vapp_templates
vapp = vapp_templates.first
tests("Compute::VcloudDirector | vapp_template") do
tests("#id").returns(String){ vapp.id.class }
tests("#name").returns(String){ vapp.name.class }
tests("#href").returns(String){ vapp.href.class }
tests("#type").returns("application/vnd.vmware.vcloud.vAppTemplate+xml"){ vapp.type }
end
tests("Compute::VcloudDirector | vapp_template vms") do
tests("#vms").returns(Fog::Compute::VcloudDirector::TemplateVms) { vapp.vms.class }
pending if Fog.mock?
vm = vapp.vms[0]
tests("#name").returns(String){ vm.name.class }
tests("#type").returns("application/vnd.vmware.vcloud.vm+xml"){ vm.type }
end
end