diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-03-01 14:54:09 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-03-01 14:54:09 +0900 |
| commit | eefdf85f16778064453ab5fd5a0752c3875cd54a (patch) | |
| tree | 36e2e21c3b0703e53644283c5a479df97074bd64 | |
| parent | [API] Better error message (diff) | |
| download | sharkey-eefdf85f16778064453ab5fd5a0752c3875cd54a.tar.gz sharkey-eefdf85f16778064453ab5fd5a0752c3875cd54a.tar.bz2 sharkey-eefdf85f16778064453ab5fd5a0752c3875cd54a.zip | |
[Test] Fix tests
| -rw-r--r-- | test/api.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/api.ts b/test/api.ts index 72a5603edb..dfedd01376 100644 --- a/test/api.ts +++ b/test/api.ts @@ -1200,7 +1200,7 @@ describe('API', () => { request('/messaging/messages/create', { user_id: hima._id.toString(), text: 'Hey hey ひまわり' - }).then(res => { + }, me).then(res => { res.should.have.status(200); res.body.should.be.a('object'); res.body.should.have.property('text').eql('Hey hey ひまわり'); @@ -1213,7 +1213,7 @@ describe('API', () => { request('/messaging/messages/create', { user_id: me._id.toString(), text: 'Yo' - }).then(res => { + }, me).then(res => { res.should.have.status(400); done(); }); @@ -1224,7 +1224,7 @@ describe('API', () => { request('/messaging/messages/create', { user_id: '000000000000000000000000', text: 'Yo' - }).then(res => { + }, me).then(res => { res.should.have.status(400); done(); }); @@ -1235,7 +1235,7 @@ describe('API', () => { request('/messaging/messages/create', { user_id: 'kyoppie', text: 'Yo' - }).then(res => { + }, me).then(res => { res.should.have.status(400); done(); }); @@ -1246,7 +1246,7 @@ describe('API', () => { const hima = await insertHimawari(); request('/messaging/messages/create', { user_id: hima._id.toString() - }).then(res => { + }, me).then(res => { res.should.have.status(400); done(); }); @@ -1258,7 +1258,7 @@ describe('API', () => { request('/messaging/messages/create', { user_id: hima._id.toString(), text: '!'.repeat(501) - }).then(res => { + }, me).then(res => { res.should.have.status(400); done(); }); |