1158: Requisition comments should have similar JPA/Hibernate annotations as line items
Test Case #:284
Test Case Name: Requisition comments should have similar JPA/Hibernate annotations as line items | |
System: openLMIS | Subsystem: blue |
Test case designed by: Lucyna Laska | Design Date:14.12.2016 |
Short description:
|
|
Pre – conditions: |
Step | Action | Expected system response | Comment |
1 | Create comment for requisition. URL:http://test.openlmis.org/api/requisitions/d96eeb69-f6eb-4307-91a6-ded3398feac7/comments?access_token=ec47bdc1-7fcf-47d1-a8fc-aa3a6bd0f768 Method: POST Body: { "requisition": { "id": "d96eeb69-f6eb-4307-91a6-ded3398feac7" }, "body": "example body", "createdDate": [ 2016, 12, 14, 7, 33, 9, 313000000 ] } |
| |
2 | Create another comment to requisition. Method: POST Body: { "requisition": { "id": "d96eeb69-f6eb-4307-91a6-ded3398feac7" }, "body": "the second comment", "createdDate": [ 2016, 12, 14, 7, 33, 9, 313000000 ] } | ||
3 | Check if requisition has created comments. URL: http://test.openlmis.org/api/requisitions/d96eeb69-f6eb-4307-91a6-ded3398feac7?access_token=ec47bdc1-7fcf-47d1-a8fc-aa3a6bd0f768 Method: GET | ||
4 | Update one of the comments mentioned above. Method: PUT Body: { "id": "b30fb8be-f9d0-4f7f-810a-e2c5736ca2d5", "requisition": { "id": "d96eeb69-f6eb-4307-91a6-ded3398feac7" }, "body": "the second comment TEST", "createdDate": [ 2016, 12, 14, 14, 0, 53, 479000000 ] } | the second method: Method: POST get the details of requisition and check if comment has been updated properly. Method: GET | |
5 | Check if comment is updated in requisition. URL: http://test.openlmis.org/api/requisitions/d96eeb69-f6eb-4307-91a6-ded3398feac7?access_token=ec47bdc1-7fcf-47d1-a8fc-aa3a6bd0f768 Method: GET | ||
6 | Get all comments for specified requisition. Method: GET | ||
7 | Delete one of the comment mentioned above. Method: DELETE | ||
8 | Check if deleted comments is not available on requisition details. Method: GET | ||
9 | Check if the list of comments for specified requisition is updated. Method: GET |