I18n's short format for times differs from "%b %e", update test (#16414)

This passed in the branch because the last commit was on a two digit
day (so the digit padding wasn't needed or expected, it checked "Jan 30" ==
"Jan 30", but today "Feb 4" != "Feb  4")
This commit is contained in:
Daniel Uber 2022-02-03 15:49:09 -06:00 committed by GitHub
parent e45536af37
commit 99307167f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -632,7 +632,7 @@ RSpec.describe Article, type: :model do
it "does not show year in readable time if not current year" do
time_now = Time.current
article.edited_at = time_now
expect(article.readable_edit_date).to eq(time_now.strftime("%b %e"))
expect(article.readable_edit_date).to eq(I18n.l(article.edited_at, format: :short))
end
it "shows year in readable time if not current year" do