checkvist-api/testdata/tasks/single.json
Oliver Jakoubek e2d0f2299c Add unit tests for Tasks
Create tasks_test.go with comprehensive tests:
- TestTasks_List: list all tasks in checklist
- TestTasks_Get: get single task by ID
- TestTasks_Create: create basic task
- TestTasks_Create_WithBuilder: create task with all options
- TestTasks_Update: update task properties
- TestTasks_Delete: delete task
- TestTasks_Close: mark task as completed
- TestTasks_Reopen: reopen closed task
- TestTasks_Invalidate: invalidate task
- TestDueDate_Parsing: table-driven due date parsing tests
- TestTaskBuilder: builder pattern validation

Add testdata/tasks/ fixtures:
- list.json: sample task list
- single.json: single task response

All 11 tests pass using httptest.Server mocking.

Closes checkvist-api-v2f
2026-01-14 13:46:08 +01:00

16 lines
322 B
JSON

{
"id": 101,
"checklist_id": 1,
"parent_id": 0,
"content": "First task",
"status": 0,
"position": 1,
"priority": 0,
"tags_as_text": "",
"due": "2026-01-20",
"assignee_ids": [],
"comments_count": 0,
"update_line": "",
"updated_at": "2026-01-14T10:00:00Z",
"created_at": "2026-01-10T09:00:00Z"
}