From 945c34590677e161a711ccaff0e1077197b1b178 Mon Sep 17 00:00:00 2001 From: Doot Agent Date: Mon, 6 Jul 2026 00:00:59 +0000 Subject: feat: remove Todoist integration entirely Native tasks (native_tasks table) fully replace Todoist. All Todoist API code, store functions, handlers, routes, templates, and tests have been removed. Migration 021 drops the now-unused tasks cache table. Co-Authored-By: Claude Sonnet 4.6 --- internal/models/atom_test.go | 54 -------------------------------------------- 1 file changed, 54 deletions(-) (limited to 'internal/models/atom_test.go') diff --git a/internal/models/atom_test.go b/internal/models/atom_test.go index 53bf343..6f86949 100644 --- a/internal/models/atom_test.go +++ b/internal/models/atom_test.go @@ -5,60 +5,6 @@ import ( "time" ) -func TestTaskToAtom(t *testing.T) { - now := time.Now() - task := Task{ - ID: "task-123", - Content: "Test task", - Description: "Task description", - DueDate: &now, - Priority: 3, - URL: "https://todoist.com/task/123", - CreatedAt: now, - IsRecurring: true, - } - - atom := TaskToAtom(task) - - if atom.ID != "task-123" { - t.Errorf("Expected ID 'task-123', got '%s'", atom.ID) - } - if atom.Title != "Test task" { - t.Errorf("Expected title 'Test task', got '%s'", atom.Title) - } - if atom.Source != SourceTodoist { - t.Errorf("Expected source Todoist, got '%s'", atom.Source) - } - if atom.Type != TypeTask { - t.Errorf("Expected type Task, got '%s'", atom.Type) - } - if atom.Priority != 3 { - t.Errorf("Expected priority 3, got %d", atom.Priority) - } - if atom.SourceIcon != "🔴" { - t.Error("Expected red circle icon") - } - if !atom.IsRecurring { - t.Error("Expected IsRecurring to be true") - } -} - -func TestTaskToAtom_PriorityClamping(t *testing.T) { - // Test priority below 1 - lowTask := Task{Priority: 0} - lowAtom := TaskToAtom(lowTask) - if lowAtom.Priority != 1 { - t.Errorf("Priority should be clamped to 1, got %d", lowAtom.Priority) - } - - // Test priority above 4 - highTask := Task{Priority: 10} - highAtom := TaskToAtom(highTask) - if highAtom.Priority != 4 { - t.Errorf("Priority should be clamped to 4, got %d", highAtom.Priority) - } -} - func TestCardToAtom(t *testing.T) { now := time.Now() card := Card{ -- cgit v1.2.3