Add custom APITime type with UnmarshalJSON to handle the non-standard
date format returned by the Checkvist API ("2026/01/14 16:07:31 +0000")
instead of the expected RFC3339 format.
Changes:
- Add APITime type with custom JSON marshaling/unmarshaling in models.go
- Replace time.Time with APITime for UpdatedAt/CreatedAt fields in
Checklist, Task, and Note structs
- Add NewAPITime constructor for convenience
- Update test fixtures to use real API date format
- Add comprehensive unit tests for APITime in models_test.go
Fixes: checkvist-api-4qn
Create notes_test.go with tests:
- TestNotes_List: list all notes on a task
- TestNotes_Create: create new note
- TestNotes_Update: update note comment
- TestNotes_Delete: delete note
Add testdata/notes/ fixtures:
- list.json: sample notes list
All 4 tests pass using httptest.Server mocking.
Closes checkvist-api-bbx
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
Create checklists_test.go with comprehensive tests:
- TestChecklists_List: list all checklists
- TestChecklists_ListArchived: list with archived filter
- TestChecklists_Get: get single checklist by ID
- TestChecklists_Get_NotFound: handle 404 error
- TestChecklists_Create: create new checklist
- TestChecklists_Update: update checklist name
- TestChecklists_Delete: delete checklist
Add testdata/checklists/ fixtures:
- list.json: sample checklist list
- list_archived.json: archived checklists
- single.json: single checklist response
All 7 tests pass using httptest.Server mocking.
Closes checkvist-api-347