mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 00:27:58 +08:00
FIX: Better error messages when name is too long
Previously you'd get a server side generic error due to a password check failing. Now the input element has a maxlength attribute and the server side will respond with a nicer error message if the value is too long.
This commit is contained in:
@ -65,6 +65,11 @@ describe User do
|
||||
expect(user.errors.full_messages.first)
|
||||
.to include(user_error_message(:name, :same_as_password))
|
||||
end
|
||||
|
||||
it "doesn't raise an error if the name is longer than the max password length" do
|
||||
user.name = 'x' * 220
|
||||
expect(user).to be_valid
|
||||
end
|
||||
end
|
||||
|
||||
describe 'emails' do
|
||||
|
Reference in New Issue
Block a user