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

@ -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`] = ` exports[`#user.promote should promote a new admin 1`] = `
Object { Object {
"data": Object { "data": Object {

View File

@ -19,15 +19,13 @@ describe('#user.info', async () => {
const body = await res.json(); const body = await res.json();
expect(res.status).toEqual(200); 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 () => { it('should require authentication', async () => {
const res = await server.post('/api/user.info'); const res = await server.post('/api/user.info');
const body = await res.json();
expect(res.status).toEqual(401); expect(res.status).toEqual(401);
expect(body).toMatchSnapshot();
}); });
}); });