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/03 12:17:36 UTC
svn commit: r1867936 -
/ofbiz/ofbiz-framework/trunk/applications/order/src/main/groovy/org/apache/ofbiz/order/OrderTests.groovy
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: 'test_email@example.com',
+ 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")
+ }
}