18 lines
546 B
Elixir
18 lines
546 B
Elixir
defmodule ToweropsWeb.SitemapControllerTest do
|
|
use ToweropsWeb.ConnCase, async: true
|
|
|
|
describe "GET /sitemap.xml" do
|
|
test "returns valid XML with public pages", %{conn: conn} do
|
|
conn = get(conn, "/sitemap.xml")
|
|
|
|
assert response(conn, 200)
|
|
assert get_resp_header(conn, "content-type") == ["text/xml; charset=utf-8"]
|
|
body = response(conn, 200)
|
|
assert body =~ ~r/<\?xml/
|
|
assert body =~ "<urlset"
|
|
assert body =~ "<loc>"
|
|
assert body =~ "/privacy"
|
|
assert body =~ "/terms"
|
|
end
|
|
end
|
|
end
|