]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/user_preference_test.rb
Merge pull request #4502 from tomhughes/oauth2-authorization-time
[rails.git] / test / models / user_preference_test.rb
index 2f5e16b18f47703b1b827b0bf0a33e296dd62623..ee91777c787813292f87c2e95fd8b3003973b040 100644 (file)
@@ -20,7 +20,7 @@ class UserPreferenceTest < ActiveSupport::TestCase
       up.user = create(:user)
       up.k = key * i
       up.v = val * i
-      assert up.valid?
+      assert_predicate up, :valid?
       assert up.save!
       resp = UserPreference.find(up.id)
       assert_equal key * i, resp.k, "User preference with #{i} #{key} chars (i.e. #{key.length * i} bytes) fails"
@@ -36,7 +36,7 @@ class UserPreferenceTest < ActiveSupport::TestCase
       up.user = create(:user)
       up.k = key * i
       up.v = val * i
-      assert_not up.valid?
+      assert_not_predicate up, :valid?
       assert_raise(ActiveRecord::RecordInvalid) { up.save! }
     end
   end