diff --git a/src/integration-test/java/org/openlmis/requisition/web/RequisitionControllerIntegrationTest.java b/src/integration-test/java/org/openlmis/requisition/web/RequisitionControllerIntegrationTest.java index 0487fb6e2..4d535ff8f 100644 --- a/src/integration-test/java/org/openlmis/requisition/web/RequisitionControllerIntegrationTest.java +++ b/src/integration-test/java/org/openlmis/requisition/web/RequisitionControllerIntegrationTest.java @@ -1276,7 +1276,6 @@ public void shouldInitiateRequisition() { verify(facilityReferenceDataService).findOne(facility.getId()); verify(validReasonStockmanagementService).search(program.getId(), facility.getType().getId()); - verify(reasonsValidator).validate(stockAdjustmentReasons, requisition.getTemplate()); verify(requisitionService, atLeastOnce()) .initiate(eq(program), eq(facility), eq(period), eq(false), eq(stockAdjustmentReasons), eq(requisition.getTemplate()), @@ -1455,7 +1454,6 @@ public void shouldInitiateRequisitionWithIdempotencyKey() { verify(facilityReferenceDataService).findOne(facility.getId()); verify(validReasonStockmanagementService).search(program.getId(), facility.getType().getId()); - verify(reasonsValidator).validate(stockAdjustmentReasons, requisition.getTemplate()); verify(requisitionService, atLeastOnce()) .initiate(eq(program), eq(facility), eq(period), eq(false), eq(stockAdjustmentReasons), eq(requisition.getTemplate()), diff --git a/src/integration-test/java/org/openlmis/requisition/web/RequisitionV2ControllerIntegrationTest.java b/src/integration-test/java/org/openlmis/requisition/web/RequisitionV2ControllerIntegrationTest.java index 0f9769e71..352505c2d 100644 --- a/src/integration-test/java/org/openlmis/requisition/web/RequisitionV2ControllerIntegrationTest.java +++ b/src/integration-test/java/org/openlmis/requisition/web/RequisitionV2ControllerIntegrationTest.java @@ -162,7 +162,6 @@ public void shouldInitiateRequisition() { verify(facilityReferenceDataService).findOne(facility.getId()); verify(validReasonStockmanagementService).search(program.getId(), facility.getType().getId()); - verify(reasonsValidator).validate(stockAdjustmentReasons, requisition.getTemplate()); verify(requisitionService, atLeastOnce()) .initiate(eq(program), eq(facility), eq(period), eq(false), eq(stockAdjustmentReasons), eq(requisition.getTemplate()), diff --git a/src/main/java/org/openlmis/requisition/web/BaseRequisitionController.java b/src/main/java/org/openlmis/requisition/web/BaseRequisitionController.java index 1a26c84e9..1f0ed5b4f 100644 --- a/src/main/java/org/openlmis/requisition/web/BaseRequisitionController.java +++ b/src/main/java/org/openlmis/requisition/web/BaseRequisitionController.java @@ -98,7 +98,6 @@ import org.openlmis.requisition.utils.DatePhysicalStockCountCompletedEnabledPredicate; import org.openlmis.requisition.utils.Message; import org.openlmis.requisition.utils.StockEventBuilder; -import org.openlmis.requisition.validate.ReasonsValidator; import org.openlmis.requisition.validate.RequisitionVersionValidator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -198,9 +197,6 @@ public abstract class BaseRequisitionController extends BaseController { @Autowired private RequisitionTemplateService requisitionTemplateService; - @Autowired - private ReasonsValidator reasonsValidator; - InitiateResult doInitiate(UUID programId, UUID facilityId, UUID suggestedPeriod, boolean emergency, HttpServletRequest request, Profiler profiler) { if (null == facilityId || null == programId) { @@ -243,9 +239,6 @@ InitiateResult doInitiate(UUID programId, UUID facilityId, UUID suggestedPeriod, program, facility, period, emergency, stockAdjustmentReasons, requisitionTemplate, approvedProducts); - profiler.start("VALIDATE_REASONS"); - reasonsValidator.validate(stockAdjustmentReasons, newRequisition.getTemplate()); - return new InitiateResult(newRequisition, approvedProducts, facility, program, period); }