summaryrefslogtreecommitdiff
path: root/internal/api/todoist_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/api/todoist_test.go')
-rw-r--r--internal/api/todoist_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/api/todoist_test.go b/internal/api/todoist_test.go
index f7ca719..159be61 100644
--- a/internal/api/todoist_test.go
+++ b/internal/api/todoist_test.go
@@ -143,6 +143,14 @@ func TestTodoistClient_CreateTask_WithDueDate(t *testing.T) {
}
}
+func TestTodoistClient_UsesAPIv1BaseURL(t *testing.T) {
+ client := NewTodoistClient("test-key")
+ const want = "https://api.todoist.com/api/v1"
+ if client.BaseURL != want {
+ t.Errorf("expected base URL %q, got %q — Todoist REST v2 is deprecated (HTTP 410)", want, client.BaseURL)
+ }
+}
+
func TestTodoistClient_CompleteTask(t *testing.T) {
// Mock server
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {