Author: surajk
Date: Sat May 25 15:48:08 2019
New Revision: 1859999
URL: http://svn.apache.org/viewvc?rev=1859999&view=rev
Log:
Improved: Unit test case for service - CheckReturnComplete.
(OFBIZ-8853)
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=1859999&r1=1859998&r2=1859999&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:48:08 2019
@@ -40,4 +40,14 @@ class OrderTests extends GroovyScriptTes
assert ServiceUtil.isSuccess(serviceResult)
assert serviceResult.returnAdjustmentId != null
}
+
+ void testCheckReturnComplete() {
+ Map serviceCtx = [:]
+ serviceCtx.amount = '2.0000'
+ serviceCtx.returnId = '1009'
+ serviceCtx.userLogin =
EntityQuery.use(delegator).from('UserLogin').where('userLoginId',
'system').cache().queryOne()
+ Map serviceResult = dispatcher.runSync('checkReturnComplete',
serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ assert serviceResult.statusId != null
+ }
}
\ No newline at end of file