mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-23 18:33:09 +02:00
[Test] Add some tests
This commit is contained in:
parent
2cc2ecb13c
commit
2596e82532
1 changed files with 18 additions and 0 deletions
18
test/api.js
18
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', () => {
|
||||
|
|
Loading…
Reference in a new issue