Fix test env having access to internet; add apps.miti.sh server to conf

This commit is contained in:
2025-06-11 13:15:50 -07:00
parent 54052e3890
commit dc8fb2f1f2
3 changed files with 22 additions and 1 deletions

View File

@@ -8,6 +8,12 @@ req = (url) ->
error request\lastError! if not st
request
describe "test environment", ->
it "can't connect to the internet", ->
request = http.init "http://example.org"
assert.not_true request\perform!
assert.same request\lastError!, "Couldn't resolve host name"
describe "http://webdevcat.me", ->
it "permanently redirects to http://miti.sh", ->
request = req "http://webdevcat.me"
@@ -69,3 +75,9 @@ describe "http://miti.sh/posts", ->
assert.same request\statusCode!, 200
assert.same request\statusMessage!, "OK"
assert.same request\body!\match("<title>(.*)</title>"), "miti.sh · Posts"
describe "http://apps.miti.sh", ->
it "doesn't find it", ->
request = req "http://apps.miti.sh"
assert.same request\statusCode!, 404
assert.same request\statusMessage!, "Not Found"