Sha256: ed376a6a03ae9c8363b7dc689172c6cc5f2cc1a0b619f5ccc4e8d798df41a127

Contents?: true

Size: 377 Bytes

Versions: 20

Compression:

Stored size: 377 Bytes

Contents

require 'test_helper'

class CassandraObject::ValidationsTest < CassandraObject::TestCase
  test 'create!' do
    begin
      Issue.validates(:description, :presence => true)

      Issue.create!(:description => 'lol')

      assert_raise(CassandraObject::RecordInvalid) { Issue.create!(:description => '') }
    ensure
      Issue.reset_callbacks(:validate)
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
sessionm-cassandra_object-2.2.35 test/validations_test.rb
sessionm-cassandra_object-2.2.34 test/validations_test.rb
sessionm-cassandra_object-2.2.33 test/validations_test.rb
sessionm-cassandra_object-2.2.32 test/validations_test.rb
sessionm-cassandra_object-2.2.31 test/validations_test.rb
sessionm-cassandra_object-2.2.30 test/validations_test.rb
sessionm-cassandra_object-2.2.29 test/validations_test.rb
sessionm-cassandra_object-2.2.28 test/validations_test.rb
sessionm-cassandra_object-2.2.27 test/validations_test.rb
sessionm-cassandra_object-2.2.26 test/validations_test.rb
sessionm-cassandra_object-2.2.24 test/validations_test.rb
sessionm-cassandra_object-2.2.23 test/validations_test.rb
sessionm-cassandra_object-2.2.22 test/validations_test.rb
sessionm-cassandra_object-2.2.20 test/validations_test.rb
sessionm-cassandra_object-2.2.18 test/validations_test.rb
sessionm-cassandra_object-2.2.16 test/validations_test.rb
sessionm-cassandra_object-2.2.14 test/validations_test.rb
sessionm-cassandra_object-2.2.12 test/validations_test.rb
sessionm-cassandra_object-2.2.10 test/validations_test.rb
sessionm-cassandra_object-2.2.8 test/validations_test.rb