X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/c8ee1351049ef1bb4d7b50d071b2a96154266d1d..b52e5ef1cf8caa53d710c298952fd626adc1b51e:/test/unit/user_preference_test.rb diff --git a/test/unit/user_preference_test.rb b/test/unit/user_preference_test.rb index 2118fcd39..d95989a4f 100644 --- a/test/unit/user_preference_test.rb +++ b/test/unit/user_preference_test.rb @@ -1,7 +1,8 @@ require File.dirname(__FILE__) + '/../test_helper' class UserPreferenceTest < ActiveSupport::TestCase - fixtures :users, :user_preferences + api_fixtures + fixtures :user_preferences # This checks to make sure that there are two user preferences # stored in the test database. @@ -19,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