Skip to content

Commit 9091193

Browse files
committed
ECWID-138834 fixed test after ECWID-115922
1 parent 7f43d47 commit 9091193

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/test/kotlin/com/ecwid/apiclient/v3/entity/CartsTest.kt

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,9 +694,21 @@ private fun UpdatedOrder.cleanupForComparison(order: UpdatedOrder): UpdatedOrder
694694
option.copy(
695695
valueTranslated = order.items?.get(index)?.selectedOptions?.get(optIndex)?.valueTranslated
696696
)
697+
},
698+
discounts = order.items?.get(index)?.discounts?.mapIndexed { discountIndex, discount ->
699+
discount.copy(
700+
discountInfo = order.items?.get(index)?.discounts?.get(discountIndex)?.discountInfo?.copy(
701+
appliesToItems = null
702+
)
703+
)
697704
}
698705
)
699706
},
700707
customerFiscalCode = null, // ApiOrder has empty string instead of null
708+
discountInfo = order.discountInfo?.map {
709+
it.copy(
710+
appliesToItems = null
711+
)
712+
}
701713
)
702714
}

0 commit comments

Comments
 (0)