You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by mr...@apache.org on 2019/06/22 09:57:53 UTC

svn commit: r1861829 - /ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/test/AutoAcctgPaymentTests.groovy

Author: mridulpathak
Date: Sat Jun 22 09:57:53 2019
New Revision: 1861829

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

Thanks Deepak Nigam for reporting and providing initial patch and Yogesh Naroliya for providing the updated patch.

Modified:
    ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/test/AutoAcctgPaymentTests.groovy

Modified: ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/test/AutoAcctgPaymentTests.groovy
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/test/AutoAcctgPaymentTests.groovy?rev=1861829&r1=1861828&r2=1861829&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/test/AutoAcctgPaymentTests.groovy (original)
+++ ofbiz/ofbiz-framework/trunk/applications/accounting/groovyScripts/test/AutoAcctgPaymentTests.groovy Sat Jun 22 09:57:53 2019
@@ -64,4 +64,16 @@ class AutoAcctgPaymentTests extends Groo
         assert payment
         assert payment.statusId == 'PMNT_SENT'
     }
+
+    void testGetPayments() {
+        Map serviceCtx = [
+                finAccountTransId: '1001',
+                userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+        ]
+
+        Map serviceResult = dispatcher.runSync('getPayments', serviceCtx)
+
+        assert ServiceUtil.isSuccess(serviceResult)
+        assert serviceResult.payments != null
+    }
 }