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.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/internal/api/todoist_test.go b/internal/api/todoist_test.go
index 2fa6e28..7bbcc1e 100644
--- a/internal/api/todoist_test.go
+++ b/internal/api/todoist_test.go
@@ -13,7 +13,7 @@ import (
// newTestTodoistClient creates a TodoistClient for testing with custom base URL
func newTestTodoistClient(baseURL, apiKey string) *TodoistClient {
client := NewTodoistClient(apiKey)
- client.BaseClient.BaseURL = baseURL
+ client.BaseURL = baseURL
client.syncClient.BaseURL = baseURL
return client
}
@@ -62,7 +62,7 @@ func TestTodoistClient_CreateTask(t *testing.T) {
}
w.Header().Set("Content-Type", "application/json")
- json.NewEncoder(w).Encode(response)
+ _ = json.NewEncoder(w).Encode(response)
}))
defer server.Close()
@@ -96,7 +96,7 @@ func TestTodoistClient_CreateTask_WithDueDate(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
// Parse JSON body
var payload map[string]interface{}
- json.NewDecoder(r.Body).Decode(&payload)
+ _ = json.NewDecoder(r.Body).Decode(&payload)
// Verify due_date
if payload["due_date"] != "2026-01-15" {
@@ -117,7 +117,7 @@ func TestTodoistClient_CreateTask_WithDueDate(t *testing.T) {
}
w.Header().Set("Content-Type", "application/json")
- json.NewEncoder(w).Encode(response)
+ _ = json.NewEncoder(w).Encode(response)
}))
defer server.Close()
@@ -181,7 +181,7 @@ func TestTodoistClient_CompleteTask_Error(t *testing.T) {
// Mock server that returns error
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusNotFound)
- w.Write([]byte(`{"error":"Task not found"}`))
+ _, _ = w.Write([]byte(`{"error":"Task not found"}`))
}))
defer server.Close()
@@ -218,7 +218,7 @@ func TestTodoistClient_GetProjects(t *testing.T) {
}
w.Header().Set("Content-Type", "application/json")
- json.NewEncoder(w).Encode(response)
+ _ = json.NewEncoder(w).Encode(response)
}))
defer server.Close()