Add unit tests for Notes
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
This commit is contained in:
parent
e2d0f2299c
commit
2f44308d42
3 changed files with 189 additions and 1 deletions
16
testdata/notes/list.json
vendored
Normal file
16
testdata/notes/list.json
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
[
|
||||
{
|
||||
"id": 501,
|
||||
"task_id": 101,
|
||||
"comment": "First comment on task",
|
||||
"updated_at": "2026-01-14T10:00:00Z",
|
||||
"created_at": "2026-01-13T09:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": 502,
|
||||
"task_id": 101,
|
||||
"comment": "Second comment with more details",
|
||||
"updated_at": "2026-01-14T11:30:00Z",
|
||||
"created_at": "2026-01-14T11:00:00Z"
|
||||
}
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue