Verify feeds exclude future-dated posts

This commit is contained in:
Willem van den Ende
2026-04-01 20:37:27 +00:00
parent a380d0cb69
commit 370275f7b5
2 changed files with 19 additions and 9 deletions
+10
View File
@@ -65,6 +65,11 @@ defmodule Blogex.FeedTest do
refute xml =~ "draft-post"
end
test "excludes future-dated published posts", %{blog: blog} do
xml = Feed.rss(blog, @base_url)
refute xml =~ "future-post"
end
test "includes self-referencing atom:link", %{blog: blog} do
xml = Feed.rss(blog, @base_url)
@@ -95,6 +100,11 @@ defmodule Blogex.FeedTest do
entry_count = xml |> String.split("<entry>") |> length() |> Kernel.-(1)
assert entry_count == 2
end
test "excludes future-dated published posts", %{blog: blog} do
xml = Feed.atom(blog, @base_url)
refute xml =~ "future-post"
end
end
describe "XML escaping" do