mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
24 lines
447 B
JavaScript
24 lines
447 B
JavaScript
import {
|
|
generateUser,
|
|
requester,
|
|
} from '../../helpers/api.helper';
|
|
|
|
describe('PUT /user', () => {
|
|
let api, user;
|
|
|
|
beforeEach(() => {
|
|
return generateUser().then((usr) => {
|
|
user = usr;
|
|
api = requester(user);
|
|
});
|
|
});
|
|
|
|
it('updates the user', () => {
|
|
return api.put('/user', {
|
|
'profile.name' : 'Frodo',
|
|
}).then((updatedUser) => {
|
|
expect(updatedUser.profile.name).to.eql('Frodo');
|
|
});
|
|
});
|
|
});
|