Improved: Unit test case for service - CheckPaymentAmountForRefund.
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.
@@ -50,4 +50,12 @@ class OrderTests extends GroovyScriptTestCase {
assert ServiceUtil.isSuccess(serviceResult)
assert serviceResult.statusId != null
}
+
+ void testCheckPaymentAmountForRefund() {
+ Map serviceCtx = [:]
+ serviceCtx.returnId = '1009'
+ serviceCtx.userLogin = EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+ Map serviceResult = dispatcher.runSync('checkPaymentAmountForRefund', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
}
\ No newline at end of file
