mirror of
https://github.com/discourse/discourse.git
synced 2025-09-07 12:02:53 +08:00
FEATURE: Rename discourse-cronos to discourse-local-dates
This commit is contained in:
parent
ee426623e4
commit
c81854ad14
99 changed files with 104 additions and 574 deletions
17
plugins/discourse-local-dates/spec/lib/pretty_text_spec.rb
Normal file
17
plugins/discourse-local-dates/spec/lib/pretty_text_spec.rb
Normal file
|
@ -0,0 +1,17 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe PrettyText do
|
||||
it 'supports inserting date' do
|
||||
freeze_time
|
||||
cooked = PrettyText.cook <<~MD
|
||||
[date=2018-05-08 time=22:00 format=LLL timezones="Europe/Paris|America/Los_Angeles"]
|
||||
MD
|
||||
|
||||
expect(cooked).to include('class="discourse-local-date"')
|
||||
expect(cooked).to include('data-date="2018-05-08"')
|
||||
expect(cooked).to include('data-format="LLL"')
|
||||
expect(cooked).to include('data-timezones="Europe/Paris|America/Los_Angeles"')
|
||||
expect(cooked).to include('May 8, 2018 3:00 PM (America: Los Angeles)')
|
||||
expect(cooked).to include('May 9, 2018 12:00 AM (Europe: Paris)')
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue