File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ DA:58,2
1313DA:59,2
1414DA:60,1
1515DA:62,1
16- DA:68,0
17- DA:73,0
16+ DA:68,2
17+ DA:73,2
1818LF:16
19- LH:14
19+ LH:16
2020end_of_record
Original file line number Diff line number Diff line change @@ -81,6 +81,25 @@ void main() {
8181 throwsA (isA <HttpException >()),
8282 );
8383 });
84+
85+ test ('throws OperationFailedException on unexpected error' , () async {
86+ // Arrange
87+ final exception = Exception ('Unexpected error' );
88+ when (
89+ () => mockHttpClient.post <void >(any (), data: any (named: 'data' )),
90+ ).thenThrow (exception);
91+
92+ // Act & Assert
93+ expect (
94+ () => emailClient.sendTransactionalEmail (
95+ senderEmail: senderEmail,
96+ recipientEmail: recipientEmail,
97+ templateId: templateId,
98+ templateData: templateData,
99+ ),
100+ throwsA (isA <OperationFailedException >()),
101+ );
102+ });
84103 });
85104 });
86105}
You can’t perform that action at this time.
0 commit comments