Improved: Unit test case for service - ProcessRepairReplacementReturn
OrderTests.groovy has been splitted in other files, this test fits in
OrderReturnTests.groovy
Thanks: Avnindra Sharma for initial test and Suraj for Groovy conversion
@@ -215,4 +215,12 @@ class OrderReturnTests extends OFBizTestCase {
Map serviceResult = dispatcher.runSync('processRefundReturnForReplacement', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
}
+ void testProcessRepairReplacementReturn() {
+ Map serviceCtx = [
+ returnId: '1009',
+ userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+ ]
+ Map serviceResult = dispatcher.runSync('processRepairReplacementReturn', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
}
\ No newline at end of file
