From: Tom Hughes Date: Tue, 21 Sep 2010 21:21:55 +0000 (+0100) Subject: Duplicate records raise RecordNotUnique now, not StatementInvalid X-Git-Tag: live~6658 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/a92223a50672201070bbf659b1e99bbda6edadbd Duplicate records raise RecordNotUnique now, not StatementInvalid --- diff --git a/test/unit/user_preference_test.rb b/test/unit/user_preference_test.rb index df9e1e9b2..d95989a4f 100644 --- a/test/unit/user_preference_test.rb +++ b/test/unit/user_preference_test.rb @@ -20,7 +20,7 @@ class UserPreferenceTest < ActiveSupport::TestCase newUP.k = up.k newUP.v = "some other value" assert_not_equal newUP.v, up.v - assert_raise (ActiveRecord::StatementInvalid) {newUP.save} + assert_raise (ActiveRecord::RecordNotUnique) {newUP.save} end def test_check_valid_length