diff options
author | Alan Pearce | 2017-06-24 22:25:53 +0200 |
---|---|---|
committer | Alan Pearce | 2017-06-24 22:25:53 +0200 |
commit | ab881e671747b3b1826524bb71ccb615254e3c4f (patch) | |
tree | 4ab34a62332045e1ae0cad2ee76ac2dd76294398 /test | |
parent | bfa5ccaec4cb601836c47a43faf6ac79f018b81b (diff) | |
download | homestead-ab881e671747b3b1826524bb71ccb615254e3c4f.tar.lz homestead-ab881e671747b3b1826524bb71ccb615254e3c4f.tar.zst homestead-ab881e671747b3b1826524bb71ccb615254e3c4f.zip |
test: ensure 404s work
Diffstat (limited to 'test')
-rw-r--r-- | test/app.test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/app.test.js b/test/app.test.js index 04596fa..a054366 100644 --- a/test/app.test.js +++ b/test/app.test.js @@ -25,6 +25,14 @@ test('post', t => { .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 @@ test('tags', t => { .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())) |