Sha256: cbc7fc9c9a3d3fb2baeb5e892597daa2dd878017c289540850993baef5adb5f8

Contents?: true

Size: 661 Bytes

Versions: 132

Compression:

Stored size: 661 Bytes

Contents

require 'test_helper'

class CassandraObject::IdentityTest < CassandraObject::TestCase
  test 'parse_key' do
    assert_kind_of(
      CassandraObject::Identity::UUIDKeyFactory::UUID,
      Issue.parse_key('bb4cbbbc-b7c7-11e0-9ca2-732604ff41fe')
    )
    
    assert_nil Issue.parse_key('fail')
  end

  test 'id' do
    issue = Issue.create

    assert_equal issue.key.to_s, issue.id
  end

  test 'equality of new records' do
    assert_not_equal Issue.new, Issue.new
  end

  test 'equality' do
    first_issue = Issue.create
    second_issue = Issue.create

    assert_equal first_issue, first_issue
    assert_not_equal first_issue, second_issue
  end
end

Version data entries

132 entries across 132 versions & 2 rubygems

Version Path
sessionm-cassandra_object-4.0.32 test/identity_test.rb
sessionm-cassandra_object-4.0.31 test/identity_test.rb
sessionm-cassandra_object-4.0.30 test/identity_test.rb
sessionm-cassandra_object-4.0.29 test/identity_test.rb
sessionm-cassandra_object-4.0.28 test/identity_test.rb
sessionm-cassandra_object-4.0.27 test/identity_test.rb
sessionm-cassandra_object-4.0.26 test/identity_test.rb
sessionm-cassandra_object-4.0.25 test/identity_test.rb
sessionm-cassandra_object-4.0.24 test/identity_test.rb
sessionm-cassandra_object-4.0.23 test/identity_test.rb
sessionm-cassandra_object-4.0.22 test/identity_test.rb
sessionm-cassandra_object-4.0.21 test/identity_test.rb
sessionm-cassandra_object-4.0.20 test/identity_test.rb
sessionm-cassandra_object-2.7.5 test/identity_test.rb
sessionm-cassandra_object-2.7.4 test/identity_test.rb
sessionm-cassandra_object-4.0.18 test/identity_test.rb
sessionm-cassandra_object-4.0.17 test/identity_test.rb
sessionm-cassandra_object-4.0.16 test/identity_test.rb
sessionm-cassandra_object-4.0.15 test/identity_test.rb
sessionm-cassandra_object-4.0.14 test/identity_test.rb