X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/dbd88d893f3c3fce9cafd666b94396988646d81f..3e88348b27bd432bd7cfcc2e01f7b77a01011e68:/test/models/user_preference_test.rb diff --git a/test/models/user_preference_test.rb b/test/models/user_preference_test.rb index bceec0719..d6f1dcce5 100644 --- a/test/models/user_preference_test.rb +++ b/test/models/user_preference_test.rb @@ -15,7 +15,7 @@ class UserPreferenceTest < ActiveSupport::TestCase def test_check_valid_length key = "k" val = "v" - (1..255).each do |i| + [1, 255].each do |i| up = UserPreference.new up.user = create(:user) up.k = key * i @@ -36,7 +36,7 @@ class UserPreferenceTest < ActiveSupport::TestCase up.user = create(:user) up.k = key * i up.v = val * i - assert_equal false, up.valid? + assert_not up.valid? assert_raise(ActiveRecord::RecordInvalid) { up.save! } end end