diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-10-30 21:55:16 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-10-30 21:55:16 +0900 |
| commit | 120474ec6a4744e111eb06fb26d1638a7fb0eb6c (patch) | |
| tree | 04b0fcd7e58f2c7e87157dac8e93ceb39a8e4652 /test/api.ts | |
| parent | Update test/api.ts (diff) | |
| download | misskey-120474ec6a4744e111eb06fb26d1638a7fb0eb6c.tar.gz misskey-120474ec6a4744e111eb06fb26d1638a7fb0eb6c.tar.bz2 misskey-120474ec6a4744e111eb06fb26d1638a7fb0eb6c.zip | |
Fix bug
Diffstat (limited to 'test/api.ts')
| -rw-r--r-- | test/api.ts | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/api.ts b/test/api.ts index 1bb8e20b17..6debea4d12 100644 --- a/test/api.ts +++ b/test/api.ts @@ -508,6 +508,24 @@ describe('API', () => { }, me); expect(res).have.status(400); })); + + it('同じユーザーに複数メンションしても内部的にまとめられる', async(async () => { + const alice = await signup({ username: 'alice' }); + const bob = await signup({ username: 'bob' }); + const post = { + text: '@bob @bob @bob yo' + }; + + const res = await request('/notes/create', post, alice); + + expect(res).have.status(200); + expect(res.body).be.a('object'); + expect(res.body).have.property('createdNote'); + expect(res.body.createdNote).have.property('text').eql(post.text); + + const noteDoc = await db.get('notes').findOne({ _id: res.body.createdNote.id }); + expect(noteDoc.mentions.map((id: any) => id.toString())).eql([bob.id.toString()]); + })); }); describe('notes/show', () => { |