diff options
-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())) |