Author: surajk
Date: Sat May 25 15:50:49 2019
New Revision: 1860000
URL:
http://svn.apache.org/viewvc?rev=1860000&view=revLog:
Improved: Unit test case for service - CheckPaymentAmountForRefund.
(OFBIZ-8852)
Thanks Avnindra Sharma for reporting the issue and Yogesh Naroliya for providing the patch.
Modified:
ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
Modified: ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy?rev=1860000&r1=1859999&r2=1860000&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy Sat May 25 15:50:49 2019
@@ -50,4 +50,12 @@ class OrderTests extends GroovyScriptTes
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