优化结构

This commit is contained in:
Yvan
2026-08-22 20:14:29 +08:00
parent 44ab14448a
commit 699bcceeea
90 changed files with 534 additions and 298 deletions
+17
View File
@@ -0,0 +1,17 @@
package task
import (
"context"
"testing"
)
func TestTaskRepoListIsEmptyBeforeDatabaseInitialization(t *testing.T) {
repo := NewTaskRepo(&Data{})
items, total, err := repo.ListTasks(context.Background(), 0, 0, nil)
if err != nil {
t.Fatal(err)
}
if total != 0 || len(items) != 0 {
t.Fatalf("bootstrap tasks = (%d, %d), want empty", total, len(items))
}
}