Fix #5143: Allow name changes with same name but changed case.

This commit is contained in:
evazion
2022-11-12 23:03:00 -06:00
parent 22f232f4e9
commit d053dc7356
3 changed files with 21 additions and 6 deletions

View File

@@ -151,6 +151,13 @@ class UserTest < ActiveSupport::TestCase
assert_equal(["Name can't contain whitespace"], user.errors.full_messages)
end
should "not conflict with an existing name" do
create(:user, name: "bkub")
user = build(:user, name: "BKUB")
user.save
assert_equal(["Name already taken"], user.errors.full_messages)
end
should "be less than 25 characters long" do
user = build(:user, name: "a"*25)
user.save