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

22 lines
692 B
Ruby
Raw Normal View History

2012-11-27 19:57:16 -05:00
provider, config = :ecloud, compute_providers[:ecloud]
Shindo.tests("Fog::Compute[:#{provider}] | organizations", [provider.to_s]) do
connection = Fog::Compute[provider]
tests('#all').succeeds do
returns(false) { connection.organizations.all.empty? }
end
tests('#get').succeeds do
organization = connection.organizations.all.first
fetched_organization = connection.organizations.get(organization.href)
returns(true) { !fetched_organization.nil? }
end
tests("#admin").succeeds do
organization = connection.organizations.all.first
returns(true, "return AdminOrganization") { organization.admin.is_a?(Fog::Compute::Ecloud::AdminOrganization) }
end
end