test: add RSS feed endpoint tests

Verify content type, RSS structure, draft exclusion, and language
element.
This commit is contained in:
2026-06-25 21:41:19 +02:00
parent 2181538691
commit 4597c685da
+11
View File
@@ -92,4 +92,15 @@ class ServerTest < Minitest::Test
assert_includes slugs, "global"
refute_includes slugs, "hello"
end
def test_feed_endpoint
get "/api/volumen/feed.xml"
assert_predicate last_response, :ok?
assert_equal "application/rss+xml", last_response["Content-Type"]&.split(";")&.first
body = last_response.body
assert_includes body, "<rss version=\"2.0\">"
assert_includes body, "<title>Hello</title>"
refute_includes body, "Draft"
assert_includes body, "<language>en</language>"
end
end