feat: adiciona nova funcionalidade (com erro oculto) #7

Merged
pm merged 39 commits from teste-bloqueio into main 2026-06-12 23:26:15 +00:00
Showing only changes of commit 3a2685d5b6 - Show all commits
+3 -5
View File
@@ -68,12 +68,10 @@ describe('Enterprise Application Flow & API Validation', () => {
// Validate HTTP Response
expect(response.status).toBe(200);
expect(response.body).toHaveProperty('success', true);
expect(response.body.message).toContain('confirmation email has been dispatched');
// Validate Business Logic (Verify if the mock function was actually called)
const mockTransport = nodemailer.createTransport();
expect(mockTransport.sendMail).toHaveBeenCalledTimes(1);
// Validate Business Logic: Verifica o objeto 'transporter' que veio do server.js
// Como este objeto é o que injetámos no server, ele já é o mock!
expect(transporter.sendMail).toHaveBeenCalledTimes(1);
});
});
});