# should be used.
bad = [ "<hr/>", "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
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
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