From 068f199bb0314eadc2588617de1caf5a8b795a94 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 10 Jul 2018 18:38:39 -0700 Subject: [PATCH] :green_heart: --- server/api/__snapshots__/user.test.js.snap | 23 ---------------------- server/api/user.test.js | 6 ++---- 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/server/api/__snapshots__/user.test.js.snap b/server/api/__snapshots__/user.test.js.snap index 0130eb43d..ea9827a22 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 b82e37f79..f2f7a5a08 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(); }); });