X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/32c385e8d7dd55194de1904462afc73b38a1542e..4d44f188e1b69d94ea9f364d85a57dcd262a93ba:/test/models/user_test.rb?ds=inline diff --git a/test/models/user_test.rb b/test/models/user_test.rb index 15bd64ccc..f10e8c023 100644 --- a/test/models/user_test.rb +++ b/test/models/user_test.rb @@ -87,7 +87,9 @@ class UserTest < ActiveSupport::TestCase # should be used. bad = [ "
", "test@example.com", "s/f", "aa/", "aa;", "aa.", "aa,", "aa?", "/;.,?", "も対応します/", "#ping", - "foo\x1fbar", "foo\x7fbar" ] + "foo\x1fbar", "foo\x7fbar", "foo\ufffebar", "foo\uffffbar", + "new", "terms", "save", "confirm", "confirm-email", + "go_public", "reset-password", "forgot-password", "suspended" ] ok.each do |display_name| user = users(:normal_user) user.display_name = display_name @@ -98,7 +100,6 @@ class UserTest < ActiveSupport::TestCase user = users(:normal_user) user.display_name = display_name assert !user.valid?, "#{display_name} is valid when it shouldn't be" - assert user.errors[:display_name].include?("is invalid") end end @@ -180,10 +181,10 @@ class UserTest < ActiveSupport::TestCase end end - def test_public - assert_equal 16, User.public.count + def test_identifiable + assert_equal 16, User.identifiable.count assert_raise ActiveRecord::RecordNotFound do - User.public.find(users(:normal_user).id) + User.identifiable.find(users(:normal_user).id) end end