Skip to content

Commit

Permalink
test updated
Browse files Browse the repository at this point in the history
  • Loading branch information
nokibul committed Mar 26, 2024
1 parent 55d53c7 commit 3bfec73
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/modules/account/account.repository.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,20 @@ describe('AccountRepository', () => {
it('should find an account by email', async () => {
// Arrange
const email = 'stringdf2@gmail.com';

const signupDto: AccountDTO = {
name: generateRandomEmail(),
firstName: 'John',
lastName: 'Doe',
email: email,
birthDate: new Date('1990-01-01'),
password: 'securePassword123',
contactNo: generateRandomEmail(),
gender: Gender.male,
secondaryEmail: 'john.alt@example.com',
location: 'City, Country',
about: 'A brief description about John Doe',
};
await accountRepository.create(signupDto);
// Act
const findByEmailSpy = jest.spyOn(accountRepository, 'findByEmail');
const result = await accountRepository.findByEmail(email);
Expand Down

0 comments on commit 3bfec73

Please sign in to comment.