all repos — archive/homestead @ ab881e671747b3b1826524bb71ccb615254e3c4f

My future indieweb platform

test: ensure 404s work

Alan Pearce
commit

ab881e671747b3b1826524bb71ccb615254e3c4f

parent

bfa5ccaec4cb601836c47a43faf6ac79f018b81b

1 file changed, 15 insertions(+), 0 deletions(-)

changed files
M test/app.test.jstest/app.test.js
@@ -25,6 +25,14 @@ .expect(/<h1>Lorem ipsum<\/h1>/)
.then(() => t.pass()) }) +test('post not found', t => { + return request(app.listen()) + .get('/post/non-existant') + .expect(404) + .expect(/Post not found/) + .then(() => t.pass()) +}) + test('tags', t => { return request(app.listen()) .get('/tag/a')
@@ -32,3 +40,10 @@ .expect(200)
.expect(/This is a test/) .then(() => t.pass()) }) + +test('tags not found', t => + request(app.listen()) + .get('/tag/non-existant') + .expect(404) + .expect(/tag non-existant not found/) + .then(() => t.pass()))