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-2.5.9 test/callbacks_test.rb
sessionm-cassandra_object-2.5.8 test/callbacks_test.rb
sessionm-cassandra_object-2.5.7 test/callbacks_test.rb
sessionm-cassandra_object-2.5.6 test/callbacks_test.rb
sessionm-cassandra_object-2.5.5 test/callbacks_test.rb
sessionm-cassandra_object-2.5.4 test/callbacks_test.rb
sessionm-cassandra_object-2.5.3 test/callbacks_test.rb
sessionm-cassandra_object-2.5.2 test/callbacks_test.rb
sessionm-cassandra_object-2.5.1 test/callbacks_test.rb
sessionm-cassandra_object-2.5.0 test/callbacks_test.rb
sessionm-cassandra_object-2.4.9 test/callbacks_test.rb
sessionm-cassandra_object-2.4.8 test/callbacks_test.rb
sessionm-cassandra_object-2.4.7 test/callbacks_test.rb
sessionm-cassandra_object-2.4.6 test/callbacks_test.rb
sessionm-cassandra_object-2.4.5 test/callbacks_test.rb
sessionm-cassandra_object-2.4.4 test/callbacks_test.rb
sessionm-cassandra_object-2.4.3 test/callbacks_test.rb
sessionm-cassandra_object-2.4.2 test/callbacks_test.rb
sessionm-cassandra_object-2.4.1 test/callbacks_test.rb
sessionm-cassandra_object-2.4.0 test/callbacks_test.rb