mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 05:01:14 +08:00
FEATURE: adds countdown attribute to [date] (#8037)
When used, dates will be displayed as a countdown in a human friendly way.
This commit is contained in:
@ -79,4 +79,11 @@ RSpec.describe "Local Dates" do
|
||||
|
||||
expect(cooked).not_to include("data-timezone=")
|
||||
end
|
||||
|
||||
it 'supports countdowns' do
|
||||
raw = "[date=2018-11-01 time=12:00 countdown=true]"
|
||||
cooked = Fabricate(:post, raw: raw).cooked
|
||||
|
||||
expect(cooked).to include("data-countdown=")
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user