Sha256: 8ee52d9c606723c6f5b113ef7c09b3f2e5c93bc78a4335eb6453019ce7ec8c0c

Contents?: true

Size: 245 Bytes

Versions: 13

Compression:

Stored size: 245 Bytes

Contents

require 'abstract_unit'

class TestValidations < ActiveSupport::TestCase
  fixtures :seats

  def test_uniqueness_validation_persisted
    seat = Seat.find([1,1])
    assert(seat.valid?)

    seat.customer = 2
    assert(!seat.valid?)
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
composite_primary_keys-3.1.11 test/test_validations.rb
composite_primary_keys-4.0.0.beta7 test/test_validations.rb
composite_primary_keys-4.0.0.beta6 test/test_validations.rb
composite_primary_keys-4.0.0.beta5 test/test_validations.rb
composite_primary_keys-4.0.0.beta4 test/test_validations.rb
composite_primary_keys-4.0.0.beta3 test/test_validations.rb
composite_primary_keys-3.1.10 test/test_validations.rb
composite_primary_keys-4.0.0.beta2 test/test_validations.rb
composite_primary_keys-4.0.0.beta1 test/test_validations.rb
composite_primary_keys-3.1.9 test/test_validations.rb
composite_primary_keys-3.1.8 test/test_validations.rb
composite_primary_keys-3.1.7 test/test_validations.rb
composite_primary_keys-3.1.6 test/test_validations.rb