FIX: handle german quotes in discourse local-dates (#8386)

https://meta.discourse.org/t/insert-date-timezone-is-always-utc-my-timezone-is-ignored/126307
This commit is contained in:
Joffrey JAFFEUX
2019-11-21 11:43:35 +01:00
committed by GitHub
parent 026832fb80
commit 3d1b6b6729
2 changed files with 13 additions and 2 deletions

View File

@ -80,4 +80,13 @@ describe PrettyText do
expect(excerpt).to eq("Wednesday, October 16, 2019 6:00 PM (UTC)")
end
end
context 'german quotes' do
let(:post) { Fabricate(:post, raw: '[date=2019-10-16 time=14:00:00 format="LLLL" timezone=„America/New_York“]') }
it 'converts german quotes to regular quotes' do
excerpt = PrettyText.excerpt(post.cooked, 200)
expect(excerpt).to eq('Wednesday, October 16, 2019 6:00 PM (UTC)')
end
end
end