diff --git a/server/api/__snapshots__/user.test.js.snap b/server/api/__snapshots__/user.test.js.snap index 0130eb43..ea9827a2 100644 --- a/server/api/__snapshots__/user.test.js.snap +++ b/server/api/__snapshots__/user.test.js.snap @@ -70,29 +70,6 @@ Object { } `; -exports[`#user.info should require authentication 1`] = ` -Object { - "error": "authentication_required", - "message": "Authentication required", - "ok": false, - "status": 401, -} -`; - -exports[`#user.info should return known user 1`] = ` -Object { - "data": Object { - "avatarUrl": null, - "createdAt": "2018-01-01T00:00:00.000Z", - "id": "e998a8ab-0d45-4920-912b-9df93d281cb9", - "name": "User 2", - "username": "user2", - }, - "ok": true, - "status": 200, -} -`; - exports[`#user.promote should promote a new admin 1`] = ` Object { "data": Object { diff --git a/server/api/user.test.js b/server/api/user.test.js index b82e37f7..f2f7a5a0 100644 --- a/server/api/user.test.js +++ b/server/api/user.test.js @@ -19,15 +19,13 @@ describe('#user.info', async () => { const body = await res.json(); expect(res.status).toEqual(200); - expect(body).toMatchSnapshot(); + expect(body.data.id).toEqual(user.id); + expect(body.data.name).toEqual(user.name); }); it('should require authentication', async () => { const res = await server.post('/api/user.info'); - const body = await res.json(); - expect(res.status).toEqual(401); - expect(body).toMatchSnapshot(); }); });