Sha256: 270f46a7043d144882084250c095415f408e57844132841ce2cef57afec31ed8

Contents?: true

Size: 757 Bytes

Versions: 113

Compression:

Stored size: 757 Bytes

Contents

Shindo.tests("Fog::Compute[:openstack] | tenants", ['openstack']) do
  @instance = Fog::Identity[:openstack].tenants.create(:name => 'test')

  tests('success') do
    tests('#find_by_id').succeeds do
      tenant = Fog::Identity[:openstack].tenants.find_by_id(@instance.id)
      tenant.id == @instance.id
    end

    tests('#destroy').succeeds do
      Fog::Identity[:openstack].tenants.destroy(@instance.id)
    end
  end

  tests('fails') do
    pending if Fog.mocking?

    tests('#find_by_id').raises(Fog::Identity::OpenStack::NotFound) do
      Fog::Identity[:openstack].tenants.find_by_id('fake')
    end

    tests('#destroy').raises(Fog::Identity::OpenStack::NotFound) do
      Fog::Identity[:openstack].tenants.destroy('fake')
    end
  end
end

Version data entries

113 entries across 113 versions & 15 rubygems

Version Path
fog-openstack-0.1.5 tests/openstack/models/identity/tenants_tests.rb
fog-openstack-0.1.4 tests/openstack/models/identity/tenants_tests.rb
fog-openstack-0.1.3 tests/openstack/models/identity/tenants_tests.rb
fog-openstack-0.1.2 tests/openstack/models/identity/tenants_tests.rb
fog-openstack-0.1.1 tests/openstack/models/identity/tenants_tests.rb
fog-openstack-0.1.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.37.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.36.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.35.0 tests/openstack/models/identity/tenants_tests.rb
fog-2.0.0.pre.0 tests/openstack/models/identity/tenants_tests.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/tests/openstack/models/identity/tenants_tests.rb
fog-1.34.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.33.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.32.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.31.0 tests/openstack/models/identity/tenants_tests.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/tests/openstack/models/identity/tenants_tests.rb
fog-1.30.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.29.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.28.0 tests/openstack/models/identity/tenants_tests.rb
fog-1.27.0 tests/openstack/models/identity/tenants_tests.rb