Improved: Unit test case for service - GetReturnAmountByOrder.

(OFBIZ-8861)
Thanks Avnindra Sharma for reporting and Yogesh Naroliya for providing the updated patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1861814 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Suraj Khurana
2019-06-22 05:31:11 +00:00
parent c55deb8c04
commit 10ef90f819
@@ -119,4 +119,12 @@ class OrderTests extends GroovyScriptTestCase {
assert ServiceUtil.isSuccess(serviceResult)
assert serviceResult.returnId != null
}
void testGetReturnAmountByOrder() {
Map serviceCtx = [
returnId: '1009',
userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
]
Map serviceResult = dispatcher.runSync('getReturnAmountByOrder', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
}
}