DEV: add spec for tag with unicode name
This commit is contained in:
parent
f9d55b4941
commit
61d8955fcb
|
@ -128,7 +128,7 @@ RSpec.describe ListController do
|
|||
let(:moderator) { Fabricate(:moderator) }
|
||||
let(:admin) { Fabricate(:admin) }
|
||||
let(:tag) { Fabricate(:tag) }
|
||||
let(:private_message) { Fabricate(:private_message_topic) }
|
||||
let(:private_message) { Fabricate(:private_message_topic, user: admin) }
|
||||
|
||||
before do
|
||||
SiteSetting.tagging_enabled = true
|
||||
|
@ -149,6 +149,17 @@ RSpec.describe ListController do
|
|||
expect(response.status).to eq(200)
|
||||
end
|
||||
end
|
||||
|
||||
it 'should work for tag with unicode name' do
|
||||
unicode_tag = Fabricate(:tag, name: 'hello-🇺🇸')
|
||||
Fabricate(:topic_tag, tag: unicode_tag, topic: private_message)
|
||||
|
||||
sign_in(admin)
|
||||
get "/topics/private-messages-tags/#{admin.username}/#{UrlHelper.encode_component(unicode_tag.name)}.json"
|
||||
expect(response.status).to eq(200)
|
||||
expect(response.parsed_body["topic_list"]["topics"].first["id"])
|
||||
.to eq(private_message.id)
|
||||
end
|
||||
end
|
||||
|
||||
describe '#private_messages_group' do
|
||||
|
|
Loading…
Reference in New Issue