ai cooking
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at master 33 lines 854 B view raw
1package static 2 3import ( 4 "testing" 5 6 "careme/internal/seasons" 7) 8 9func TestFaviconBySeason(t *testing.T) { 10 tests := []struct { 11 name string 12 season seasons.Season 13 want []byte 14 }{ 15 {name: "fall", season: seasons.Fall, want: faviconFall}, 16 {name: "winter", season: seasons.Winter, want: faviconWinter}, 17 {name: "spring", season: seasons.Spring, want: faviconSpring}, 18 {name: "summer", season: seasons.Summer, want: faviconSummer}, 19 {name: "default falls back to fall", season: seasons.Season("unknown"), want: faviconFall}, 20 } 21 22 for _, tt := range tests { 23 t.Run(tt.name, func(t *testing.T) { 24 got := faviconBySeason(tt.season) 25 if len(got) == 0 { 26 t.Fatal("favicon should not be empty") 27 } 28 if len(got) != len(tt.want) { 29 t.Fatalf("faviconBySeason(%q) length = %d, want %d", tt.season, len(got), len(tt.want)) 30 } 31 }) 32 } 33}