Improved: Unit test case for service - ProcessCreditReturn.
Thanks: Avnindra Sharma for reporting, Rushikesh Mawal for providing the updated patch and Jacques for review.
@@ -265,4 +265,12 @@ class OrderTests extends OFBizTestCase {
Map serviceResult = dispatcher.runSync('checkCreateOrderRequirement', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
}
+ void testProcessCreditReturn() {
+ Map serviceCtx = [
+ returnId: '1009',
+ userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+ ]
+ Map serviceResult = dispatcher.runSync('processCreditReturn', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
}
