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

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

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

Mridul Pathak-5
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
+    }
 }