1099: OOAD Refactor: Requisition endpoints should be usable without hitting Requisition Template endpoints

Test Case #:284


Test Case Name: OOAD Refactor: Requisition endpoints should be usable without hitting Requisition Template endpoints

System: openLMIS

Subsystem: blue

Test case designed by: Lucyna Laska

Design Date:26.01.2017

Short description

  • you need the MANAGE_REQUISITION_TEMPLATE permission to use the requisition template endpoints
  • templates & requisitions generally behave the same as they used - don't spend much time on this

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                                                       

 

 

Step

Action

Expected system response

Comment

1

        Add the MANAGE_REQUISITION_TEMPLATE permission to user.   


                                                                                                                            

Proper role has been assigned to user.
                                                 

2

 Check If it's possible to use GET /requisitionTemplates endpoint.

 

When proper role is assigned to user, the view of requisitionTemplate list is accessible.

 

3

Remove the MANAGE_REQUISITION_TEMPLATE permission from user.

 

The proper role has been removed.

 

4

 Check if access will be denied when user try to get:

  • the list of all requisitionTemplates (GET /requisitionTemplates).
  •  details of parciular reqTemplate (GET /requisitionTemplates/id).
  • delete requisition (DELETE /requisitionTemplates/id)
  • create requisitionTemplate (POST /requisitionTemplates)
  • update requisitionTemplate (PUT /requisitionTemplates/id)


When proper role is not assigned with user, it's not possible to view the Requisition Template. 403 Forbidden is returned because "REQUISITION_TEMPLATES_MANAGE" permission is not assigned with user.

OR

OR

OR

OR

 

5

   

6

  

 

7

 

 

 

8

                                                 

 

 

 

Post – conditions:

OpenLMIS: the global initiative for powerful LMIS software