Skip to content

Commit

Permalink
fix: update email service tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ludtkemorgan committed Dec 17, 2024
1 parent 825a6b3 commit 49021f3
Show file tree
Hide file tree
Showing 4 changed files with 316 additions and 171 deletions.
5 changes: 5 additions & 0 deletions api/test/integration/listing.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,11 @@ describe('Listing Controller Tests', () => {
},
},
});
const emailEntries =
mockSeSClient.call(0).args[0].input['BulkEmailEntries'];
expect(emailEntries).not.toContain({
Destination: { ToAddresses: [wrongJurisAdmin.email] },
});
});

it('update status to listing approved and notify appropriate users', async () => {
Expand Down
12 changes: 1 addition & 11 deletions api/test/integration/user.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,11 @@ describe('User Controller Tests', () => {

const mockSeSClient = mockClient(SESv2Client);

// const invitePartnerUserMock = jest.fn();
// const testEmailService = {
// confirmation: jest.fn(),
// welcome: jest.fn(),
// invitePartnerUser: invitePartnerUserMock,
// changeEmail: jest.fn(),
// forgotPassword: jest.fn(),
// sendMfaCode: jest.fn(),
// };

beforeEach(() => {
jest.resetAllMocks();
mockSeSClient.reset();
mockSeSClient.on(SendEmailCommand).resolves({
MessageId: 'morgan',
MessageId: randomUUID(),
$metadata: {
httpStatusCode: 200,
},
Expand Down
Loading

0 comments on commit 49021f3

Please sign in to comment.