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:
Joffrey JAFFEUX
2019-08-24 11:39:20 -05:00
committed by GitHub
parent 39c31a3d76
commit bf05a8da96
5 changed files with 33 additions and 1 deletions

View File

@ -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