diff options
author | Alan Pearce | 2017-06-18 13:36:29 +0200 |
---|---|---|
committer | Alan Pearce | 2017-06-18 13:36:29 +0200 |
commit | 69af7f12ec17f0aba65b0e23ef4045ee28f2dac8 (patch) | |
tree | 281781690d7bfe4952205e33ec26dff2f442aa57 /test/index.test.js | |
parent | 370e7add837f194bebc710c10ccd11bacfc74990 (diff) | |
download | homestead-69af7f12ec17f0aba65b0e23ef4045ee28f2dac8.tar.lz homestead-69af7f12ec17f0aba65b0e23ef4045ee28f2dac8.tar.zst homestead-69af7f12ec17f0aba65b0e23ef4045ee28f2dac8.zip |
feat: add single post endpoint
Diffstat (limited to 'test/index.test.js')
-rw-r--r-- | test/index.test.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/index.test.js b/test/index.test.js index ebac87d..897438c 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -5,7 +5,7 @@ const request = require('supertest') process.env.POST_DIR = path.resolve(__dirname, '../test/data/') const app = require('../src/index.js') -test(t => { +test('homepage', t => { return request(app.listen()) .get('/') .expect(200) @@ -13,3 +13,11 @@ test(t => { .expect(/This is a test/) .then(() => t.pass()) }) + +test('post', t => { + return request(app.listen()) + .get('/post/testfile') + .expect(200) + .expect(/Lorem ipsum/) + .then(() => t.pass()) +}) |