Sha256: 449a63911dd43ae972013aa05b7df60521ee0c6dedfb0a23badc3111a54a695b

Contents?: true

Size: 1.07 KB

Versions: 96

Compression:

Stored size: 1.07 KB

Contents

Shindo.tests("Fog::Identity[:openstack] | user", ['openstack']) do
  tenant_id = Fog::Identity[:openstack].list_tenants.body['tenants'].first['id']
  @instance = Fog::Identity[:openstack].users.new({
    :name      => 'User Name',
    :email     => 'test@fog.com',
    :tenant_id => tenant_id,
    :password  => 'spoof',
    :enabled   => true
  })

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

    tests('#roles').succeeds do
      @instance.roles
    end

    tests('#update').returns(true) do
      @instance.update({:name => 'updatename', :email => 'new@email.com'})
    end

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

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

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

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

  tests('failure') do
    tests('#save').raises(Fog::Errors::Error) do
      @instance.save
    end
  end
end

Version data entries

96 entries across 96 versions & 10 rubygems

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