18 lines
369 B
Go
18 lines
369 B
Go
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))
|
|
}
|
|
}
|