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/organizations_tests.rb
2013-09-24 21:08:43 +01:00

22 lines
848 B
Ruby

require File.expand_path(File.join(File.dirname(__FILE__), 'helper'))
VCR.use_cassette(File.basename(__FILE__)) do
Shindo.tests("Compute::VcloudDirector | organizations", ['vclouddirector', 'all']) do
pending if Fog.mocking?
organizations = vcloud_director.organizations
tests("#There is at least one organization").returns(true){ organizations.size >= 1 }
org = organizations.first
tests("Compute::VcloudDirector | organization") do
tests("#name").returns(String){ org.name.class }
tests("#type").returns("application/vnd.vmware.vcloud.org+xml"){ org.type }
end
tests("Compute::VcloudDirector | organization", ['get']) do
tests("#get_by_name").returns(org.name) { organizations.get_by_name(org.name).name }
tests("#get").returns(org.id) { organizations.get(org.id).id }
end
end
end