diff options
Diffstat (limited to 'internal/models/atom_test.go')
| -rw-r--r-- | internal/models/atom_test.go | 54 |
1 files changed, 0 insertions, 54 deletions
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{ |
