Sha256: f2a8e405be3ee546440084b12520532505746edb0273c6cf214688eef3d1a354
Contents?: true
Size: 1.05 KB
Versions: 20
Compression:
Stored size: 1.05 KB
Contents
require 'test_helper' class CassandraObject::BaseTest < CassandraObject::TestCase class Son < CassandraObject::Base end class Grandson < Son end test 'base_class' do assert_equal Son, Son.base_class assert_equal Son, Grandson.base_class end test 'column family' do assert_equal 'CassandraObject::BaseTest::Sons', Son.column_family assert_equal 'CassandraObject::BaseTest::Sons', Grandson.column_family end test 'initialiaze' do issue = Issue.new assert issue.new_record? assert !issue.destroyed? 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_equal first_issue, Issue.find(first_issue.id) assert_not_equal first_issue, second_issue end test 'to_param' do issue = Issue.create assert_equal issue.id, issue.to_param end test 'hash' do issue = Issue.create assert_equal issue.id.hash, issue.hash end end
Version data entries
20 entries across 20 versions & 1 rubygems