Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion test/test_filters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,6 @@ def inspect
"layout" => "default",
"title" => "Publish",
"category" => "publish_test",
"date" => "2008-02-02 00:00:00 +0000",
"slug" => "published",
"ext" => ".markdown",
"tags" => [],
Expand All @@ -704,6 +703,13 @@ def inspect
refute_nil next_doc
assert_kind_of Hash, next_doc, "doc.next should be an object"

# `date` is not equality checked against expected because it depends on the system timezone.
# For the case of this test, date is rendered as "2008-02-02 00:00:00 +0000" in UTC,
# but in other systems it can be, eg, "2008-02-02 00:00:00 +0100" in CET.
assert actual.key?("date"), "Expected 'date' key to be present in the JSON output"
assert actual["date"].start_with?("2008-02-02 00:00:00")
actual.delete("date")

assert_equal expected, actual
end

Expand Down