svn commit: r1868341 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderNotificationTests.groovy

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

svn commit: r1868341 - /ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderNotificationTests.groovy

jleroux@apache.org
Author: jleroux
Date: Sat Oct 12 13:46:13 2019
New Revision: 1868341

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

Move to Groovy before deciding on moving OrderNotificationTests.groovy
from order to ecommerce or moving EmailOrderScreens from ecommerce to order

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

Modified: ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderNotificationTests.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderNotificationTests.groovy?rev=1868341&r1=1868340&r2=1868341&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderNotificationTests.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderNotificationTests.groovy Sat Oct 12 13:46:13 2019
@@ -26,6 +26,18 @@ class OrderNotificationTests extends OFB
     public OrderNotificationTests(String name) {
         super(name)
     }
+    
+    
+    void testSendOrderConfirmation() {
+        Map serviceCtx = [
+            orderId: 'TEST_DEMO10090',
+            sendTo: '[hidden email]',
+            userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+        ]
+        Map serviceResult = dispatcher.runSync('sendOrderConfirmation', serviceCtx)
+        assert ServiceUtil.isSuccess(serviceResult)
+        assert serviceResult.emailType.equals("PRDS_ODR_CONFIRM")
+    }
     void testSendOrderChangeNotification() {
         Map serviceCtx = [
             orderId: 'TEST_DEMO10090',