fix
This commit is contained in:
@@ -181,6 +181,19 @@ func TestCoerceCategoryToCompanyUniqueID_nameToUID(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestResolveCompanyCategoryUniqueID_usedByV1Projection(t *testing.T) {
|
||||
t.Parallel()
|
||||
names := map[string]string{"50": "Štedilniki"}
|
||||
valid := map[string]struct{}{"50": {}}
|
||||
// Poll/projection path: mapped name-only token must resolve like processOne.
|
||||
if got := resolveCompanyCategoryUniqueID("Štedilniki", names, valid); got != "50" {
|
||||
t.Fatalf("got %q want 50", got)
|
||||
}
|
||||
if got := resolveCompanyCategoryUniqueID("50", names, valid); got != "50" {
|
||||
t.Fatalf("uid passthrough got %q", got)
|
||||
}
|
||||
}
|
||||
|
||||
func TestCategoryUniqueIDFromAny_nestedNameOnly(t *testing.T) {
|
||||
t.Parallel()
|
||||
got := categoryUniqueIDFromAny(map[string]any{"name": "Štedilniki"})
|
||||
|
||||
Reference in New Issue
Block a user