svn commit: r1867929 - /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: r1867929 - /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:03:37 2019
New Revision: 1867929

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

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

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=1867929&r1=1867928&r2=1867929&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:03:37 2019
@@ -235,4 +235,14 @@ class OrderTests extends OFBizTestCase {
         assert serviceResult.emailType.equals("PRDS_ODR_BACKORDER")
     }
     
+    void testsendOrderPayRetryNotification() {
+        Map serviceCtx = [
+                  orderId: 'TEST_DEMO10090',
+                  sendTo: '[hidden email]',
+                  userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+        ]
+        Map serviceResult = dispatcher.runSync('sendOrderPayRetryNotification', serviceCtx)
+        assert ServiceUtil.isSuccess(serviceResult)
+        assert serviceResult.emailType.equals("PRDS_ODR_PAYRETRY")
+    }
 }