Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactoring #25

Merged
merged 6 commits into from
Dec 11, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
checkpoint
  • Loading branch information
dogweather committed Dec 11, 2023
commit 97d670d995806f5920dd2b2ffb7bf25d2e717b63
8 changes: 4 additions & 4 deletions test/news/date_modified_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ defmodule News.DateModifiedTest do
"""

test "parse/1 returns the date from a Yoast-style schema.org" do
document = Floki.parse_document!("<html><script type='application/ld+json'>#{@yoast_schema_org}</script></html>")
document = "<html><script type='application/ld+json'>#{@yoast_schema_org}</script></html>"

assert News.DateModified.parse(document) == ~D[2020-05-19]
assert DateModified.parse(document) == ~D[2020-05-19]
end


Expand Down Expand Up @@ -187,8 +187,8 @@ defmodule News.DateModifiedTest do


test "article:published_time date source from HTML" do
document = "duty-to-settlor.html" |> Test.fixture |> File.read! |> Floki.parse_document!
document = "duty-to-settlor.html" |> Test.fixture |> File.read!

assert News.DateModified.parse(document) == ~D[2020-05-19]
assert DateModified.parse(document) == ~D[2020-05-19]
end
end