Sha256: 957dd5c5dcc0b73da9a6506a6db2d3c6b4fe0091ff48527f505f020c07ed084d

Contents?: true

Size: 338 Bytes

Versions: 78

Compression:

Stored size: 338 Bytes

Contents

require 'test_helper'

class CassandraObject::CallbacksTest < CassandraObject::TestCase

  test 'before_validation respects :on' do
    issue = Issue.new
    issue.save
    assert_equal 'default name', issue.name

    # make sure :on => :create is respected
    issue.name = nil
    issue.save
    assert_equal nil, issue.name
  end

end

Version data entries

78 entries across 78 versions & 1 rubygems

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