summaryrefslogtreecommitdiff
path: root/internal/models/atom_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/models/atom_test.go')
-rw-r--r--internal/models/atom_test.go31
1 files changed, 31 insertions, 0 deletions
diff --git a/internal/models/atom_test.go b/internal/models/atom_test.go
index 70bc14b..53bf343 100644
--- a/internal/models/atom_test.go
+++ b/internal/models/atom_test.go
@@ -262,6 +262,37 @@ func TestTimelineItem_ComputeDaySection(t *testing.T) {
}
}
+func TestStoryToAtom_Fields(t *testing.T) {
+ story := ClaudomatorStory{
+ ID: "s1",
+ Title: "Fix auth",
+ Description: "desc",
+ Status: "IN_PROGRESS",
+ ProjectID: "nav",
+ }
+
+ atom := StoryToAtom(story)
+
+ if atom.Source != SourceClaudomator {
+ t.Errorf("Expected source 'claudomator', got '%s'", atom.Source)
+ }
+ if atom.SourceIcon != "🤖" {
+ t.Errorf("Expected SourceIcon '🤖', got '%s'", atom.SourceIcon)
+ }
+ if atom.ColorClass != "border-purple-500" {
+ t.Errorf("Expected ColorClass 'border-purple-500', got '%s'", atom.ColorClass)
+ }
+ if atom.Priority != 3 {
+ t.Errorf("Expected Priority 3, got %d", atom.Priority)
+ }
+ if atom.Title != "Fix auth" {
+ t.Errorf("Expected Title 'Fix auth', got '%s'", atom.Title)
+ }
+ if atom.Description != "desc [nav]" {
+ t.Errorf("Expected Description 'desc [nav]', got '%s'", atom.Description)
+ }
+}
+
func TestCacheMetadata_IsCacheValid(t *testing.T) {
t.Run("valid cache", func(t *testing.T) {
cm := CacheMetadata{