Sha256: d5628db88486108c0ee144b1f9eacca29fe4ebd54da78c0798219f61a00cb197

Contents?: true

Size: 830 Bytes

Versions: 35

Compression:

Stored size: 830 Bytes

Contents

Shindo.tests("Fog::Identity[:openstack] | role", ['openstack']) do
  @instance = Fog::Identity[:openstack].roles.new({:name => 'Role Name', :user_id => 1, :role_id => 1})
  @tenant   = Fog::Identity[:openstack].tenants.create(:name => 'test_user')
  @user     = Fog::Identity[:openstack].users.create(:name => 'test_user', :tenant_id => @tenant.id, :password => 'spoof')

  tests('success') do
    tests('#save').returns(true) do
      @instance.save
    end

    tests('#add_to_user(@user.id, @tenant.id)').returns(true) do
      @instance.add_to_user(@user.id, @tenant.id)
    end

    tests('#remove_to_user(@user.id, @tenant.id)').returns(true) do
      @instance.remove_to_user(@user.id, @tenant.id)
    end

    tests('#destroy').returns(true) do
      @instance.destroy
    end
  end

  @user.destroy
  @tenant.destroy
end

Version data entries

35 entries across 35 versions & 5 rubygems

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