Skip to content

Commit

Permalink
test: update UserService username update test to reflect new return s…
Browse files Browse the repository at this point in the history
…tructure
  • Loading branch information
tomast1337 committed Feb 10, 2025
1 parent cd62317 commit 70e8fce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion server/src/user/user.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,12 @@ describe('UserService', () => {

const result = await service.updateUsername(user, body);

expect(result).toEqual(user);
expect(result).toEqual({
username: 'newuser',
publicName: undefined,
email: undefined,
});

expect(user.username).toBe(body.username);
expect(service.usernameExists).toHaveBeenCalledWith(body.username);
});
Expand Down

0 comments on commit 70e8fce

Please sign in to comment.