svn commit: r1859992 - /ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1859992 - /ofbiz/ofbiz-framework/trunk/applications/order/groovyScripts/test/OrderTests.groovy

surajk
Author: surajk
Date: Sat May 25 15:34:59 2019
New Revision: 1859992

URL: http://svn.apache.org/viewvc?rev=1859992&view=rev
Log:
Improved: Unit test case for service - quickReturnOrder.
(OFBIZ-8809)
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=1859992&r1=1859991&r2=1859992&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:34:59 2019
@@ -20,4 +20,14 @@ class OrderTests extends GroovyScriptTes
         assert ServiceUtil.isSuccess(serviceResult)
         assert serviceResult.returnAdjustmentId != null
     }
+
+    void testQuickReturnOrder() {
+        Map serviceCtx = [:]
+        serviceCtx.orderId = 'TEST_DEMO10090'
+        serviceCtx.returnHeaderTypeId = 'CUSTOMER_RETURN'
+        serviceCtx.userLogin = EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+        Map serviceResult = dispatcher.runSync('quickReturnOrder', serviceCtx)
+        assert ServiceUtil.isSuccess(serviceResult)
+        assert serviceResult.returnId != null
+    }
 }
\ No newline at end of file