summaryrefslogtreecommitdiff
path: root/internal/api/trello_test.go
AgeCommit message (Collapse)Author
2026-01-23Refactor: reduce code duplication with shared abstractionsPeter Stone
- Add BaseClient HTTP abstraction (internal/api/http.go) to eliminate duplicated HTTP boilerplate across Todoist, Trello, and PlanToEat clients - Add response helpers (internal/handlers/response.go) for JSON/HTML responses - Add generic cache wrapper (internal/handlers/cache.go) using Go generics - Consolidate HandleCompleteAtom/HandleUncompleteAtom into handleAtomToggle - Merge TabsHandler into Handler, delete tabs.go - Extract sortTasksByUrgency and filterAndSortTrelloTasks helpers - Update tests to work with new BaseClient structure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-13Implement Trello write operations (Phase 3 Step 1)Peter Stone
Add CreateCard and UpdateCard methods to Trello API client with full testability support: - Refactor TrelloClient with configurable baseURL for testing - Replace hardcoded trelloBaseURL constant with c.baseURL - Implement CreateCard with support for description and due date - Implement UpdateCard with flexible field updates - Add comprehensive test suite using httptest.NewServer - Tests cover success cases, error handling, and edge cases All tests pass. Write operations ready for Phase 3 UI integration. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>