mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
further optimize spec
thanks @tgxworld for the review.
This commit is contained in:
parent
26450f7587
commit
94fb8094c6
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ describe MaxEmojisValidator do
|
||||||
SiteSetting.max_emojis_in_title = 3
|
SiteSetting.max_emojis_in_title = 3
|
||||||
record.title = '🧐 Lots of emojis here 🎃 :joy: :sunglasses:'
|
record.title = '🧐 Lots of emojis here 🎃 :joy: :sunglasses:'
|
||||||
validate
|
validate
|
||||||
expect(record.errors[:title][0]).to eq("can't have more than 3 emoji")
|
expect(record.errors[:title][0]).to eq(I18n.t("errors.messages.max_emojis", max_emojis_count: 3))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue