diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-01-20 17:51:44 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-01-20 17:51:44 +0900 |
| commit | 2596e82532c8d8400d158bad2866cf0b6e24cf13 (patch) | |
| tree | 420a1f997cd9d5434aaa79b8af0abdccc5375647 /test/api.js | |
| parent | [API] Fix: Validate id (diff) | |
| download | misskey-2596e82532c8d8400d158bad2866cf0b6e24cf13.tar.gz misskey-2596e82532c8d8400d158bad2866cf0b6e24cf13.tar.bz2 misskey-2596e82532c8d8400d158bad2866cf0b6e24cf13.zip | |
[Test] Add some tests
Diffstat (limited to 'test/api.js')
| -rw-r--r-- | test/api.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/api.js b/test/api.js index ee6098349e..c5e6476cfa 100644 --- a/test/api.js +++ b/test/api.js @@ -403,6 +403,24 @@ describe('API', () => { done(); }); })); + + it('空のパラメータで怒られる', () => new Promise(async (done) => { + const me = await insertSakurako(); + request('/posts/likes/create', {}, me).then(res => { + res.should.have.status(400); + done(); + }); + })); + + it('間違ったIDで怒られる', () => new Promise(async (done) => { + const me = await insertSakurako(); + request('/posts/likes/create', { + post_id: 'kyoppie' + }, me).then(res => { + res.should.have.status(400); + done(); + }); + })); }); describe('following/create', () => { |