Sha256: c0b73cfbd8eeb1f954b59a9fdc36735f0326ad9a9abb6947b884b530b245084c

Contents?: true

Size: 453 Bytes

Versions: 21

Compression:

Stored size: 453 Bytes

Contents

require 'test_helper'

class CassandraObject::AttributeMethods::PrimaryKeyTest < CassandraObject::TestCase
  test 'get id' do
    model = temp_object do
      key do
        'foo'
      end
    end
    record = model.new

    assert_equal 'foo', record.id
  end

  test 'set id' do
    issue = Issue.new id: 'foo'

    assert_equal 'foo', issue.id
  end

  test 'attributes' do
    issue = Issue.new

    assert_not_nil issue.attributes['id']
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
extendi-cassandra_object-1.1.1 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.1.0 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.20 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.19 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.18 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.17 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.16 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.15 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.14 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.13 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.12 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.11 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.10 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.9 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.8 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.7 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.6 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.5 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.4 test/unit/attribute_methods/primary_key_test.rb
extendi-cassandra_object-1.0.1 test/unit/attribute_methods/primary_key_test.rb