From 405965ec929c4620e0fc51dee92adb309dd0d31e Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 22 Apr 2023 05:23:35 +0000 Subject: [PATCH] test api res --- packages/backend/test/e2e/move.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/backend/test/e2e/move.ts b/packages/backend/test/e2e/move.ts index 3692330d5b..db3110f56c 100644 --- a/packages/backend/test/e2e/move.ts +++ b/packages/backend/test/e2e/move.ts @@ -48,13 +48,15 @@ describe('Account Move', () => { }, 1000 * 10); test('Able to create an alias', async () => { - await api('/i/update', { + const res = await api('/i/update', { alsoKnownAs: [`@alice@${url.hostname}`], }, bob); const newBob = await Users.findOneByOrFail({ id: bob.id }); assert.strictEqual(newBob.alsoKnownAs?.length, 1); assert.strictEqual(newBob.alsoKnownAs[0], `${url.origin}/users/${alice.id}`); + assert.strictEqual(res.body.alsoKnownAs?.length, 1); + assert.strictEqual(res.body.alsoKnownAs[0], alice.id); }); test('Able to create a local alias without hostname', async () => {