Sha256: 01da196a369f2da78a968f6e28713128b3306159e761564d0990d3ed63e157a0

Contents?: true

Size: 982 Bytes

Versions: 2

Compression:

Stored size: 982 Bytes

Contents

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::VcloudDirector::Compute::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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fog-vcloud-director-0.3.1 tests/vcloud_director/models/compute/vapp_template_tests.rb
fog-vcloud-director-0.3.0 tests/vcloud_director/models/compute/vapp_template_tests.rb