This commit is contained in:
Tom Moor
2018-07-10 18:38:39 -07:00
parent f0c192cdc0
commit 068f199bb0
2 changed files with 2 additions and 27 deletions

View File

@ -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();
});
});