Add unit tests for Checklists
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
This commit is contained in:
parent
5f71f40077
commit
0bb7d2d735
5 changed files with 309 additions and 1 deletions
13
testdata/checklists/list_archived.json
vendored
Normal file
13
testdata/checklists/list_archived.json
vendored
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
[
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Old Project",
|
||||
"public": false,
|
||||
"archived": true,
|
||||
"read_only": false,
|
||||
"task_count": 50,
|
||||
"task_completed": 50,
|
||||
"tags_as_text": "",
|
||||
"updated_at": "2025-06-01T09:00:00Z"
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue