From abfb36bcdb25ba11bda9892ec473970fc29506bb Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 22 Feb 2017 19:39:34 +0900 Subject: Fix bug --- test/api.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test') diff --git a/test/api.js b/test/api.js index 40dbdf201b..6b1cbe1c4d 100644 --- a/test/api.js +++ b/test/api.js @@ -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', { -- cgit v1.2.3-freya