summaryrefslogtreecommitdiff
path: root/internal/models
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-15 01:38:06 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-16 02:48:28 +0000
commit1d2a76f5f476d338735f4257f8b0e26238dc3170 (patch)
tree7cbdcbd529fd8bde9e45e6e3f4052fccaa81e496 /internal/models
parentb1b21d6573cf334126c0c84b60e256ca11a6293b (diff)
fix(agent): restore doot-native task support in Agent API, remove stale test
Two independent pre-existing failures, both from incomplete refactors: - agent.go's four task write/create switches (complete/uncomplete, update due date, update details, create) never got a "doot" case added when the Todoist integration was removed (945c345) in favor of native tasks -- the test file was updated to use source=doot, but the handlers themselves still only recognized "trello"/"gtasks", so every native-task Agent API call 400'd with "Unknown source". getAtomDetails already had a "doot" case, confirming this was an incomplete migration, not an intentional gap. - TestMealToAtom in atom_test.go tested MealToAtom, a function removed from atom.go months earlier (b2d8fc4) when meals were dropped from the unified Atom/timeline system; the Meal struct itself is still used elsewhere (shopping/meals feature) but no longer produces atoms, and the test was never cleaned up to match. go test ./internal/... ./cmd/... is now fully green with no failures. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VTUSAEKfsPc6WGDq45yPHD
Diffstat (limited to 'internal/models')
-rw-r--r--internal/models/atom_test.go32
1 files changed, 0 insertions, 32 deletions
diff --git a/internal/models/atom_test.go b/internal/models/atom_test.go
index 6f86949..bedb09c 100644
--- a/internal/models/atom_test.go
+++ b/internal/models/atom_test.go
@@ -37,38 +37,6 @@ func TestCardToAtom(t *testing.T) {
}
}
-func TestMealToAtom(t *testing.T) {
- date := time.Now()
- meal := Meal{
- ID: "meal-789",
- RecipeName: "Pasta",
- MealType: "dinner",
- Date: date,
- RecipeURL: "https://plantoeat.com/recipe/789",
- }
-
- atom := MealToAtom(meal)
-
- if atom.ID != "meal-789" {
- t.Errorf("Expected ID 'meal-789', got '%s'", atom.ID)
- }
- if atom.Title != "Pasta" {
- t.Errorf("Expected title 'Pasta', got '%s'", atom.Title)
- }
- if atom.Description != "dinner" {
- t.Errorf("Expected description 'dinner', got '%s'", atom.Description)
- }
- if atom.Source != SourceMeal {
- t.Errorf("Expected source Meal, got '%s'", atom.Source)
- }
- if atom.Type != TypeMeal {
- t.Errorf("Expected type Meal, got '%s'", atom.Type)
- }
- if atom.Priority != 1 {
- t.Errorf("Expected priority 1, got %d", atom.Priority)
- }
-}
-
func TestAtom_ComputeUIFields(t *testing.T) {
// Test nil due date
t.Run("nil due date", func(t *testing.T) {