Author: surajk
Date: Sat May 25 15:38:44 2019
New Revision: 1859994
URL:
http://svn.apache.org/viewvc?rev=1859994&view=revLog:
Improved: Unit test case for service - CreateReturnAndItemOrAdjustment.
(OFBIZ-8858)
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=1859994&r1=1859993&r2=1859994&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:38:44 2019
@@ -30,4 +30,14 @@ class OrderTests extends GroovyScriptTes
assert ServiceUtil.isSuccess(serviceResult)
assert serviceResult.returnId != null
}
+
+ void testCreateReturnAndItemOrAdjustment() {
+ Map serviceCtx = [:]
+ serviceCtx.orderId = 'DEMO10090'
+ serviceCtx.returnId = '1009'
+ serviceCtx.userLogin = EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+ Map serviceResult = dispatcher.runSync('createReturnAndItemOrAdjustment', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ assert serviceResult.returnAdjustmentId != null
+ }
}
\ No newline at end of file