Improved: Unit test case for service - CheckCreateStockRequirementQoh.
Thanks Avnindra Sharma for reporting the ticket and Anushi Gupta for providing the updated patch.
@@ -127,4 +127,13 @@ class OrderTests extends GroovyScriptTestCase {
Map serviceResult = dispatcher.runSync('getReturnAmountByOrder', serviceCtx)
assert ServiceUtil.isSuccess(serviceResult)
}
+ void testCheckCreateStockRequirementQoh() {
+ Map serviceCtx = [
+ orderId: 'TEST_DEMO10090',
+ orderItemSeqId: '00001',
+ userLogin: EntityQuery.use(delegator).from('UserLogin').where('userLoginId', 'system').cache().queryOne()
+ ]
+ Map serviceResult = dispatcher.runSync('checkCreateStockRequirementQoh', serviceCtx)
+ assert ServiceUtil.isSuccess(serviceResult)
+ }
}
\ No newline at end of file
