Assert /posts/index.html exists before request in nginx spec

This commit is contained in:
Catalin Constantin Mititiuc 2025-06-26 13:19:15 -07:00
parent eb896676cc
commit 82f4e9c92e

View File

@ -104,6 +104,10 @@ describe "https://miti.sh/posts/", ->
describe "https://miti.sh/posts", -> describe "https://miti.sh/posts", ->
it "sends /posts/index.html", -> it "sends /posts/index.html", ->
with require "sitegen.path"
assert .exists("html/posts/index.html"),
"missing html/posts/index.html (try `make build file=blog.html`)"
request = req "https://miti.sh/posts" request = req "https://miti.sh/posts"
assert.same request\statusCode!, 200 assert.same request\statusCode!, 200
assert.same request\statusMessage!, "OK" assert.same request\statusMessage!, "OK"