Sha256: a29f258c9540f3b374fb7ec24ca09be5888fbf826dd3838b92ab44e5c6025842

Contents?: true

Size: 1.08 KB

Versions: 17

Compression:

Stored size: 1.08 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('swordfish')
    end

    tests('#update_enabled').returns(true) do
      @instance.update_enabled('swordfish')
    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

17 entries across 17 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 tests/openstack/models/identity/user_tests.rb
fog-nirvanix-1.8.1 tests/openstack/models/identity/user_tests.rb
fog-parser-fix-1.6.1 tests/openstack/models/identity/user_tests.rb
fog-test-again-1.6.0 tests/openstack/models/identity/user_tests.rb
fog-parser-fix-1.6.0 tests/openstack/models/identity/user_tests.rb
fog-1.9.0 tests/openstack/models/identity/user_tests.rb
fog-maestrodev-1.8.0.20130114204828 tests/openstack/models/identity/user_tests.rb
fog-maestrodev-1.8.0.20130111070250 tests/openstack/models/identity/user_tests.rb
fog-maestrodev-1.8.0.20130109172219 tests/openstack/models/identity/user_tests.rb
fog-sgonyea-1.8.1 tests/openstack/models/identity/user_tests.rb
fog-1.8.0 tests/openstack/models/identity/user_tests.rb
fog-maestrodev-1.7.0.20121114190951 tests/openstack/models/identity/user_tests.rb
fog-1.7.0 tests/openstack/models/identity/user_tests.rb
fog-1.6.0 tests/openstack/models/identity/user_tests.rb
fog-1.5.0 tests/openstack/models/identity/user_tests.rb
rackspace-fog-1.4.2 tests/openstack/models/identity/user_tests.rb
fog-1.4.0 tests/openstack/models/identity/user_tests.rb