-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: user notification for carts (#262)
* chore: update commons version * feat: use companyName and description from transaction activation response * fix: update commons version * fix: update commons version
- Loading branch information
1 parent
ed8bb0e
commit c6bb363
Showing
4 changed files
with
132 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -796,16 +796,14 @@ class TransactionNotificationsQueueConsumerTest { | |
given(confidentialDataUtils.toEmail(any())).willReturn(Email("[email protected]")) | ||
val userReceiptBuilder = UserReceiptMailBuilder(confidentialDataUtils) | ||
val transactionUserReceiptData = | ||
TransactionUserReceiptData( | ||
TransactionUserReceiptData.Outcome.OK, | ||
"it-IT", | ||
PAYMENT_DATE, | ||
"testValue", | ||
"paymentDescription") | ||
TransactionUserReceiptData(TransactionUserReceiptData.Outcome.OK, "it-IT", PAYMENT_DATE) | ||
val companyName = "testCompanyName" | ||
val transactionActivatedEvent = transactionActivateEvent() | ||
transactionActivatedEvent.data.paymentNotices.forEach { it.companyName = companyName } | ||
val notificationRequested = transactionUserReceiptRequestedEvent(transactionUserReceiptData) | ||
val events = | ||
listOf( | ||
transactionActivateEvent(), | ||
transactionActivatedEvent, | ||
transactionAuthorizationRequestedEvent(), | ||
transactionAuthorizationCompletedEvent( | ||
PgsTransactionGatewayAuthorizationData(null, AuthorizationResultDto.OK)), | ||
|
@@ -825,7 +823,7 @@ class TransactionNotificationsQueueConsumerTest { | |
val notificationEmailRequestDto = | ||
userReceiptBuilder.buildNotificationEmailRequestDto(baseTransaction) | ||
assertEquals( | ||
"testValue", | ||
companyName, | ||
(notificationEmailRequestDto.parameters as SuccessTemplate) | ||
.cart | ||
.items | ||
|
@@ -841,12 +839,13 @@ class TransactionNotificationsQueueConsumerTest { | |
given(confidentialDataUtils.toEmail(any())).willReturn(Email("[email protected]")) | ||
val userReceiptBuilder = UserReceiptMailBuilder(confidentialDataUtils) | ||
val transactionUserReceiptData = | ||
TransactionUserReceiptData( | ||
TransactionUserReceiptData.Outcome.OK, "it-IT", PAYMENT_DATE, null, "paymentDescription") | ||
TransactionUserReceiptData(TransactionUserReceiptData.Outcome.OK, "it-IT", PAYMENT_DATE) | ||
val notificationRequested = transactionUserReceiptRequestedEvent(transactionUserReceiptData) | ||
val transactionActivatedEvent = transactionActivateEvent() | ||
transactionActivatedEvent.data.paymentNotices.forEach { it.companyName = null } | ||
val events = | ||
listOf( | ||
transactionActivateEvent(), | ||
transactionActivatedEvent, | ||
transactionAuthorizationRequestedEvent(), | ||
transactionAuthorizationCompletedEvent( | ||
PgsTransactionGatewayAuthorizationData(null, AuthorizationResultDto.OK)), | ||
|
This file contains 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