DEV: Correctly pluralize error messages (#26469)

This commit is contained in:
Gerhard Schlager
2024-04-04 15:02:09 +02:00
committed by GitHub
parent 79cf7c0935
commit 82c62fe44f
9 changed files with 88 additions and 42 deletions

View File

@ -1739,7 +1739,7 @@ RSpec.describe UsersController do
body = response.parsed_body
expect(body["errors"].first).to include(
I18n.t("user.username.short", min: User.username_length.begin),
I18n.t("user.username.short", count: User.username_length.begin),
)
expect(user.reload.username).to eq(old_username)
@ -1893,7 +1893,7 @@ RSpec.describe UsersController do
it 'should return the "too long" message' do
expect(response.status).to eq(200)
expect(response.parsed_body["errors"]).to include(
I18n.t(:"user.username.long", max: SiteSetting.max_username_length),
I18n.t(:"user.username.long", count: SiteSetting.max_username_length),
)
end
end