1104: Calculation logic to determine number of months in period is incorrect
Test Case #:1104
Test Case Name: Calculation logic to determine number of months in period is incorrect | |
System: openLMIS | Subsystem: blue |
Test case designed by: Lucyna Laska | Design Date:09.11.2016 |
Short description:
|
|
Pre – conditions: |
Step | Action | Expected system response | Comment |
1 | Create schedule. Method: POST Body: { "code": "someschedule", "name": "nameschedule" }
| Schedule has been created successfully. | |
2 | Create a period when difference between start date and end date is equals to:
Method: POST Body: { "name": "Period 012", "startDate": "2017-01-01", "endDate": "2017-01-02", "processingSchedule": { "id": "44b037b3-a3ed-4b26-a4ae-b22b404cb244" } } |
id: 672ced3f-0900-4a14-9fb4-7809ec360a45 |
|
3 | Check the duration for the period above. Method: GET | When the difference between end date and start date is less than 1 month and 15 days, the server will return 1 as a number of month. |
|
4 | Create a period when difference between start date and end date is equals to:
| id: 76a05c3e-5dcd-411a-907c-7d70a478c777 |
|
5 | Check the duration for the period above. Method: GET | When the difference between end date and start date is less than 1 month and 15 days, the server will return 1 as a number of month.
| |
6 | Create a period when difference between start date and end date is equals to:
Body: { "name": "Period 015", "startDate": "2017-01-18", "endDate": "2017-02-02", "processingSchedule": { "id": "44b037b3-a3ed-4b26-a4ae-b22b404cb244" } } | id: f3492014-f103-42b4-b1bb-9a3303089931 When the difference between end date and start date is less than 1 month and 15 days, the server will return 1 as a number of month |
|
7 | Check the duration for the period above. Method: GET |
When the difference between end date and start date is less than 1 month and 15 days, the server will return 1 as a number of month. |
|
8 | Create a period when difference between start date and end date is less than:
Body: { "name": "Period 016", "startDate": "2017-03-20", "endDate": "2017-05-03", "processingSchedule": { "id": "44b037b3-a3ed-4b26-a4ae-b22b404cb244" } } | id: 6d82559e-8efb-43ad-947a-23481c120b38 |
|
9 | Check the duration for the period above. Method: GET | When the difference between end date and start date is less than 1 month and 15 days, the server will return 1 as a number of month. | |
10 | Create a period when difference between start date and end date is more than:
| id: fa56a867-7c3e-4676-be5b-0207cc9a4354 | |
11 | Check the duration for the period above. | When the difference between end date and start date is more than 1 month and 14 days, the server will return 2 as a number of month. | |
12 | Create a period when difference between start date and end date is:
Method: POST Body: { "name": "Period 013", "startDate": "2018-05-19", "endDate": "2055-05-18", "processingSchedule": { "id": "881e948d-1630-43ff-a8a6-630691b4e79e" } } | id: b6b9de17-233b-4b8b-92a6-58fb13f63bd3 | |
13 | Check the duration for the period above. Method: GET |
Post – conditions: |