svn commit: r1867936 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/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: r1867936 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy

jleroux@apache.org
Author: jleroux
Date: Thu Oct  3 12:17:36 2019
New Revision: 1867936

URL: http://svn.apache.org/viewvc?rev=1867936&view=rev
Log:
Improved: Unit test case for service - sendOrderCompleteNotification
(OFBIZ-8812)

As Suraj somehow mentioned at https://markmail.org/message/zlf5chufefekb5r2,
we can use the same ticket while converting the test to Groovy

Tests pass

Thanks: Avnindra Sharma for the initial patch (here converted to Groovy)

Modified:
    ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy?rev=1867936&r1=1867935&r2=1867936&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy Thu Oct  3 12:17:36 2019
@@ -245,4 +245,15 @@ class OrderTests extends OFBizTestCase {
         assert ServiceUtil.isSuccess(serviceResult)
         assert serviceResult.emailType.equals("PRDS_ODR_PAYRETRY")
     }
+    
+    void testsendOrderCompleteNotification() {
+        Map serviceCtx = [
+                  orderId: 'TEST_DEMO10090',
+                  sendTo: '[hidden email]',
+                  userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+        ]
+        Map serviceResult = dispatcher.runSync('sendOrderCompleteNotification', serviceCtx)
+        assert ServiceUtil.isSuccess(serviceResult)
+        assert serviceResult.emailType.equals("PRDS_ODR_COMPLETE")
+    }
 }