1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/tests/openstack/models/identity/tenant_tests.rb
2012-04-30 10:34:59 +08:00

24 lines
591 B
Ruby

Shindo.tests("Fog::Identity[:openstack] | tenant", ['openstack']) do
tests('success') do
tests('#roles_for(0)').succeeds do
instance = Fog::Identity[:openstack].tenants.first
instance.roles_for(0)
end
end
tests('CRUD') do
tests('#create').succeeds do
@instance = Fog::Identity[:openstack].tenants.create(:name => 'test')
!@instance.id.nil?
end
tests('#update').succeeds do
@instance.update(:name => 'test2')
@instance.name == 'test2'
end
tests('#destroy').succeeds do
@instance.destroy == true
end
end
end