diff options
author | rick <rick@spacemonkey.local> | 2008-05-13 09:41:10 -0700 |
---|---|---|
committer | rick <rick@spacemonkey.local> | 2008-05-13 09:41:10 -0700 |
commit | 74fd17346f30fddba0e174ae17f5697f2c22279e (patch) | |
tree | 1267cea613ee4a73a2f5ddf3fb24d224dc8bbded /activerecord/test/cases/validations_test.rb | |
parent | d09a8446d5606a5a0b5c024224b09a1318e9cf4d (diff) | |
parent | 4dedc7ddcaffa8c606af11ae2d32707131b99a2e (diff) | |
download | rails-74fd17346f30fddba0e174ae17f5697f2c22279e.tar.gz rails-74fd17346f30fddba0e174ae17f5697f2c22279e.tar.bz2 rails-74fd17346f30fddba0e174ae17f5697f2c22279e.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'activerecord/test/cases/validations_test.rb')
-rwxr-xr-x | activerecord/test/cases/validations_test.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb index e3ca8660ac..a4d9da4806 100755 --- a/activerecord/test/cases/validations_test.rb +++ b/activerecord/test/cases/validations_test.rb @@ -5,6 +5,7 @@ require 'models/reply' require 'models/person' require 'models/developer' require 'models/warehouse_thing' +require 'models/guid' # The following methods in Topic are used in test_conditional_validation_* class Topic @@ -493,6 +494,13 @@ class ValidationsTest < ActiveRecord::TestCase end end + def test_validate_uniqueness_with_columns_which_are_sql_keywords + Guid.validates_uniqueness_of :key + g = Guid.new + g.key = "foo" + assert_nothing_raised { !g.valid? } + end + def test_validate_straight_inheritance_uniqueness w1 = IneptWizard.create(:name => "Rincewind", :city => "Ankh-Morpork") assert w1.valid?, "Saving w1" |