381: Configure Stock Adjustment Reason by Program

Test Case #:381


Test Case Name: Configure Stock Adjustment Reason by Program

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Kwidzińska

Design Date: 26.10.2016

Short description

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

Step

Action

Expected system response

Comment

1


2

   Create the Stock Adjustment Reason      

                                                            URL:  http://10.222.17.134/referencedata/api/stockAdjustmentReasons?access_token=6bfe4576-77aa-4401-99a5-e09e3a8c7193

Method: POST

Body:

 {

     "program": { "id": "0fe4cfee-2b11-43b0-a9ec-b6560b41784a" },

    "name": "LOST",

    "description": "lost",

    "additive": true,

    "displayOrder": 1

}

                                                       Stock Adjustment Reason is successfully created.                                                                     

                                                 

3

 Update the Stock Adjustment Reason.

URL:  http://10.222.17.134/referencedata/api/stockAdjustmentReasons/d9f67eb1-5a46-4c08-9480-00331ae14ce0?access_token=6bfe4576-77aa-4401-99a5-e09e3a8c7193

Method: PUT

Body:

 {

     "id": "d9f67eb1-5a46-4c08-9480-00331ae14ce0",

     "program": { "id": "0fe4cfee-2b11-43b0-a9ec-b6560b41784a" },

    "name": "LOST",

    "description": "lost",

    "additive": false,

    "displayOrder": 1

}

 Stock Adjustment Reason is successfully updated.


4

Update non-existed Stock Adjustment Reason.

URL:  http://10.222.17.134/referencedata/api/stockAdjustmentReasons/22f67eb1-5a46-4c08-9480-00331ae14ce0?access_token=6bfe4576-77aa-4401-99a5-e09e3a8c7193

Method: PUT

Body:

 {

     "id": "22f67eb1-5a46-4c08-9480-00331ae14ce0",

     "program": { "id": "0fe4cfee-2b11-43b0-a9ec-b6560b41784a" },

    "name": "LOST",

    "description": "lost",

    "additive": false,

    "displayOrder": 1

}

Stock Adjustment Reason which not existed can not be updated.



5

Create Stock Adjustment Reason without program.

URL:  http://10.222.17.134/referencedata/api/stockAdjustmentReasons/?access_token=6bfe4576-77aa-4401-99a5-e09e3a8c7193

Method: POST

Body:

 {

    "name": "LOST",

    "description": "lost",

    "additive": false,

    "displayOrder": 1

}

 Stock Adjustment Reason can not be created without program.


6




7




Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software