Test team.update endpoint

This commit is contained in:
Tom Moor
2018-06-01 15:02:28 -04:00
parent 140afc8a51
commit b7b5bac5c3
2 changed files with 31 additions and 14 deletions

View File

@ -13,13 +13,7 @@ afterAll(server.close);
describe('#user.info', async () => {
it('should return known user', async () => {
await seed();
const user = await User.findOne({
where: {
email: 'user1@example.com',
},
});
const { user } = await seed();
const res = await server.post('/api/user.info', {
body: { token: user.getJwtToken() },
});
@ -41,13 +35,7 @@ describe('#user.info', async () => {
describe('#user.update', async () => {
it('should update user profile information', async () => {
await seed();
const user = await User.findOne({
where: {
email: 'user1@example.com',
},
});
const { user } = await seed();
const res = await server.post('/api/user.update', {
body: { token: user.getJwtToken(), name: 'New name' },
});