X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/57e2d5a8f5adc18df966ca1801e42d3cfe01d16e..dc5d88d93d4529169429c91a631b80cff7ca605a:/test/unit/user_preference_test.rb?ds=sidebyside 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