Sha256: 6852acdd641cd9c6061b1de5589384620b10661535fd0f9becbaffa1e8e5c79a

Contents?: true

Size: 452 Bytes

Versions: 28

Compression:

Stored size: 452 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

28 entries across 28 versions & 1 rubygems

Version Path
gotime-cassandra_object-4.5.1 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.5.0 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.4.5 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.4.4 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.4.3 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.4.0 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.3.2 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.3.1 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.3.0 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.2.2 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.2.0 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.1.0 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.0.2 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.0.1 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-4.0.0 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-3.0.5 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-3.0.4 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-3.0.3 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-3.0.2 test/unit/attribute_methods/primary_key_test.rb
gotime-cassandra_object-3.0.1 test/unit/attribute_methods/primary_key_test.rb