This commit is contained in:
syuilo 2017-02-22 19:39:34 +09:00
parent 48812ad2e0
commit abfb36bcdb
4 changed files with 32 additions and 4 deletions

View file

@ -120,6 +120,19 @@ describe('API', () => {
});
}));
it('クエリをインジェクションできない', () => new Promise(async (done) => {
const me = await insertSakurako();
request('/signin', {
username: me.username,
password: {
$gt: ''
}
}).then(res => {
res.should.have.status(400);
done();
});
}));
it('正しい情報でサインインできる', () => new Promise(async (done) => {
const me = await insertSakurako();
request('/signin', {