You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2019/10/12 13:46:13 UTC

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

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: 'test_email@example.com',
+            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',