[Test] Add some tests

This commit is contained in:
syuilo 2017-01-20 17:51:44 +09:00
parent 2cc2ecb13c
commit 2596e82532
1 changed files with 18 additions and 0 deletions

View File

@ -403,6 +403,24 @@ describe('API', () => {
done(); 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', () => { describe('following/create', () => {