summaryrefslogtreecommitdiff
path: root/internal/handlers/chains_timeline_test.go
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-07-17 22:46:18 +0000
committerPeter Stone <thepeterstone@gmail.com>2026-07-17 22:46:18 +0000
commitbe4d606e9a1f5b068abcc21bbac58d1e4705ea1f (patch)
tree220aea277125aee4aa35a10201ab0a8a6c1caf89 /internal/handlers/chains_timeline_test.go
parent9460b768335dcaf7f89020caf00f1a125de14b20 (diff)
Extend chain creation to accept per-task description and priority
CreateChain and POST /api/widget/chains previously only took bare title strings, with priority hardcoded to 1 -- narrower than the spec's "an ordered list of task titles/descriptions" API line. Now accepts []models.ChainTaskInput{Content, Description, Priority} per position, priority defaulting to 1 when omitted. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EZ7ikw2ukGJFTHE3bJS7zL
Diffstat (limited to 'internal/handlers/chains_timeline_test.go')
-rw-r--r--internal/handlers/chains_timeline_test.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/handlers/chains_timeline_test.go b/internal/handlers/chains_timeline_test.go
index 76ceb68..e9c8a3a 100644
--- a/internal/handlers/chains_timeline_test.go
+++ b/internal/handlers/chains_timeline_test.go
@@ -4,13 +4,17 @@ import (
"context"
"testing"
"time"
+
+ "task-dashboard/internal/models"
)
func TestBuildTimeline_PopulatesChainBadgeForUnlockedTask(t *testing.T) {
s, cleanup := setupTestDB(t)
defer cleanup()
- chain, err := s.CreateChain("Ham Radio Track", []string{"Study Technician", "Pass exam", "Study General"})
+ chain, err := s.CreateChain("Ham Radio Track", []models.ChainTaskInput{
+ {Content: "Study Technician"}, {Content: "Pass exam"}, {Content: "Study General"},
+ })
if err != nil {
t.Fatal(err)
}