mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:21:18 +08:00
FIX: count emoji shortcuts in topic title
https://meta.discourse.org/t/max-emojis-in-title-set-to-0-conflicting-with-emoji-shortcuts/98368/3?u=techapj
This commit is contained in:
@ -14,7 +14,7 @@ describe MaxEmojisValidator do
|
||||
shared_examples "validating any topic title" do
|
||||
it 'adds an error when emoji count is greater than SiteSetting.max_emojis_in_title' do
|
||||
SiteSetting.max_emojis_in_title = 3
|
||||
record.title = '🧐 Lots of emojis here 🎃 :joy: :sunglasses:'
|
||||
record.title = '🧐 Lots of emojis here 🎃 :joy: :)'
|
||||
validate
|
||||
expect(record.errors[:title][0]).to eq(I18n.t("errors.messages.max_emojis", max_emojis_count: 3))
|
||||
|
||||
|
Reference in New Issue
Block a user