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
2013-01-04 13:50:05 -05:00

21 lines
692 B
Ruby

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