线下提号增加搜索手机号
This commit is contained in:
@@ -154,6 +154,27 @@ func TestRepositoryListAdminFiltersShopName(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestRepositoryListAdminFiltersOwnerPhone(t *testing.T) {
|
||||
repo, db := newPickupTestRepo(t)
|
||||
pickup := seedPickup(t, db, StatusPickingUp)
|
||||
|
||||
result, err := repo.ListAdmin(t.Context(), AdminPickupQuery{Keyword: "000000"})
|
||||
if err != nil {
|
||||
t.Fatalf("ListAdmin() error = %v", err)
|
||||
}
|
||||
if result.Total != 1 || len(result.Items) != 1 {
|
||||
t.Fatalf("手机号搜索结果 = total %d, items %d, want 1", result.Total, len(result.Items))
|
||||
}
|
||||
if result.Items[0].ID != pickup.ID || result.Items[0].OwnerPhone != "18800000000" {
|
||||
t.Fatalf(
|
||||
"手机号搜索结果 = id %d, phone %q, want id %d, phone 18800000000",
|
||||
result.Items[0].ID,
|
||||
result.Items[0].OwnerPhone,
|
||||
pickup.ID,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRepositoryListShopNamesReturnsDistinctPlatformOptions(t *testing.T) {
|
||||
repo, db := newPickupTestRepo(t)
|
||||
first := seedPickup(t, db, StatusPickingUp)
|
||||
|
||||
Reference in New Issue
Block a user