ensure article published dates are far enough apart to ensure they are sorted properly (#6811)

This commit is contained in:
Molly Struve 2020-03-24 10:10:22 -05:00 committed by GitHub
parent 513cf8081a
commit 2f5a8f532b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -52,6 +52,7 @@ RSpec.describe "Views an article", type: :system do
context "with regular articles" do
it "lists the articles in ascending published_at order" do
articles = create_list(:article, 2)
articles.first.update(published_at: 1.week.ago)
articles.each { |a| a.update_columns(collection_id: collection.id) }
visit articles.first.path