Add integration tests for validation, error handling, and task filtering
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Introduced `ValidationAndErrorHandlingIT` and `PagingAndFilteringIT` integration tests to verify validations, error responses, and task filtering/pagination behaviors. Updated IntelliJ HTTP client script for task-related operations. Enhanced `ProjectTaskControllerIT` assertions for better coverage.
This commit is contained in:
@ -113,6 +113,37 @@ Authorization: Bearer {{token}}
|
||||
GET http://localhost:8080/api/v1/households/{{householdId}}/tasks
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
### 15a) Prepare a {{tomorrow}} variable (YYYY-MM-DD)
|
||||
GET http://localhost:8080/public/info
|
||||
|
||||
> {%
|
||||
const d = new Date();
|
||||
d.setDate(d.getDate() + 1);
|
||||
const tomorrow = d.toISOString().slice(0,10);
|
||||
client.global.set("tomorrow", tomorrow);
|
||||
%}
|
||||
|
||||
### 15b) Capture latest household task id (if not already set)
|
||||
GET http://localhost:8080/api/v1/households/{{householdId}}/tasks?size=1&sort=createdAt,desc
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
> {%
|
||||
if (!client.global.get("taskId")) {
|
||||
const id = response.body?.content?.length ? response.body.content[0].id : null;
|
||||
if (id) client.global.set("taskId", id);
|
||||
}
|
||||
%}
|
||||
|
||||
### 15c) Set that task's dueDate to {{tomorrow}}
|
||||
PATCH http://localhost:8080/api/v1/tasks/{{taskId}}
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
{
|
||||
"dueDate": "{{tomorrow}}"
|
||||
}
|
||||
|
||||
|
||||
### 16) My tasks due tomorrow
|
||||
GET http://localhost:8080/api/v1/tasks/due/tomorrow
|
||||
Authorization: Bearer {{token}}
|
||||
|
||||
Reference in New Issue
Block a user