Initial commit

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
fish03
2026-09-23 14:43:16 +07:00
co-authored by Claude Opus 5.5
commit bef9f8b4ed
663 changed files with 81305 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package web
import "testing"
func TestEmptyScopedPage(t *testing.T) {
tests := []struct {
name string
hasIdentifier bool
totalCount int64
itemCount int
want bool
}{
{name: "missing detail", hasIdentifier: true, want: true},
{name: "empty aggregate page", hasIdentifier: false, want: false},
{name: "has total", hasIdentifier: true, totalCount: 1, want: false},
{name: "has item", hasIdentifier: true, itemCount: 1, want: false},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := emptyScopedPage(tt.hasIdentifier, tt.totalCount, tt.itemCount); got != tt.want {
t.Fatalf("emptyScopedPage(%v, %d, %d) = %v, want %v", tt.hasIdentifier, tt.totalCount, tt.itemCount, got, tt.want)
}
})
}
}