Last active
May 7, 2020 20:55
-
-
Save aloverso/a8b3ce64b60dc3e5e83e34a25e3f56b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| it('transforms into a user entity', () => { | |
| const user = buildDefaultUser({}); | |
| const expectedUserEntity = { | |
| username: user.name, | |
| password: user.password | |
| }; | |
| expect(userTransformer.transform(user)).toEqual(expectedUserEntity); | |
| }); | |
| it('assigns default password to entity when user password is empty', () => { | |
| const user = buildDefaultUser({password: ""}); | |
| const expectedUserEntity = { | |
| username: user.name, | |
| password: DEFAULT_PASSWORD | |
| } | |
| expect(userTransformer.transform(user)).toEqual(expectedUserEntity); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment