(t *testing.T)
| 1430 | } |
| 1431 | |
| 1432 | func TestValidatorConfigValue(t *testing.T) { |
| 1433 | var v *Validator |
| 1434 | if _, found := v.ConfigValue("limit"); found { |
| 1435 | t.Error("v.ConfigValue() got value from nil validator") |
| 1436 | } |
| 1437 | v = NewValidator("validator").SetConfig(map[string]any{"limit": 2}) |
| 1438 | if _, found := v.ConfigValue("absent"); found { |
| 1439 | t.Error("v.ConfigValue() found absent key") |
| 1440 | } |
| 1441 | if val, found := v.ConfigValue("limit"); !found || val != 2 { |
| 1442 | t.Errorf("v.ConfigValue() got %v, %t -- wanted 2, true", val, found) |
| 1443 | } |
| 1444 | } |
| 1445 | |
| 1446 | func TestFeatureValidate(t *testing.T) { |
| 1447 | tests := []struct { |
nothing calls this directly
no test coverage detected