1154: RequisitionService initiate improve facility and program check

Test Case #:1154


Test Case Name: RequisitionService initiate improve facility and program check

System: OpenLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:16.11.2016

Short description

The facilityId and programId input are checked in the service method--preferable to check in the controller, since controller handles input validation. Also, error message seems to be incorrect if either id is null. The message should read something about "facility or program id not found", not "Requisition with such parameters already exists".

Acceptance criteria:

  • Move check to the controller and fix error message

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

Step

Action

Expected system response

Comment

1

    It's not possible to initiate the requisition when program is null. The ID of program should be presented in request. The error message: "Facility and program must be specified when initiating a requisition" is returned.                                                                       


                                                 

2

 

    It's not possible to initiate the requisition when facility is null. The ID of facility should be presented in request. The error message: "Facility and program must be specified when initiating a requisition" is returned.    

 

3

Try to initiate requisition when program and facility are null.

URL:  http://10.222.17.134/requisition/api/requisitions/initiate?program=&facility=&suggestedPeriod=7880be4f-6582-472a-9ea5-a6baed71e6e5&emergency=true&access_token=b4c24108-4547-4f07-a7ee-b3e5cc856fdc

Method: POST

 

    It's not possible to initiate the requisition when program and facility are null. The ID of program and facility should be presented in request. The error message: "Facility and program must be specified when initiating a requisition".    


 

4

 Try to initiate a requisition when parameters are not null.

URL:  http://10.222.17.134/requisition/api/requisitions/initiate?program=10845cb9-d365-4aaa-badd-b4fa39c6a26a&facility=e6799d64-d10d-4011-b8c2-0e4d4a3f65ce&suggestedPeriod=7880be4f-6582-472a-9ea5-a6baed71e6e5&emergency=true&access_token=b4c24108-4547-4f07-a7ee-b3e5cc856fdc

Method: GET

When whole parameters are not null, initiation is possible.

 

5

  

 

6

  

 

Post – conditions:

                                 

OpenLMIS: the global initiative for powerful LMIS software