]> git.openstreetmap.org Git - rails.git/blobdiff - test/unit/user_preference_test.rb
Update to iD v1.3.2
[rails.git] / test / unit / user_preference_test.rb
index 2118fcd395df252d0c40d6cc6188cb35109b650c..d95989a4f50092fce1caac78547d0feb3a1a2420 100644 (file)
@@ -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