Sha256: e8406b18e4a447ef838fbaf641cf52a0b14838aef7577aadb32b35df3d25ba9f
Contents?: true
Size: 690 Bytes
Versions: 23
Compression:
Stored size: 690 Bytes
Contents
require 'test_helper' class ValidationTest < CassandraObjectTestCase test "save! raises an error" do begin customer = Customer.new :first_name=>"steve", :date_of_birth=>Date.parse("1979/12/25") customer.save! flunk "Should have failed to save" rescue CassandraObject::Validation::RecordInvalid => e assert_equal customer, e.record end end test "create! raises an error" do begin customer = Customer.create! :first_name=>"steve", :date_of_birth=>Date.parse("1979/12/25") flunk "Should have failed to create!" rescue CassandraObject::Validation::RecordInvalid => e assert_kind_of Customer, e.record end end end
Version data entries
23 entries across 23 versions & 1 rubygems