Refactor validators into built-in registry chains
This commit is contained in:
@@ -148,9 +148,9 @@ func TestHomophonesModuleValidatorChain(t *testing.T) {
|
||||
"no_effect",
|
||||
"original_text_presence",
|
||||
"confidence_threshold",
|
||||
"protected_glossary_terms",
|
||||
"non_empty_correction",
|
||||
"spoken_form_plausibility_review",
|
||||
"protected_terms",
|
||||
"non_empty_corrected_text",
|
||||
"spoken_form_plausibility",
|
||||
"meaning_reversal_review",
|
||||
}
|
||||
if strings.Join(got, ",") != strings.Join(want, ",") {
|
||||
@@ -276,13 +276,13 @@ func TestHomophonesProtectedGlossaryTermBehaviorRejectsUnsafeCorrection(t *testi
|
||||
}
|
||||
var protectedValidator contracts.Validator
|
||||
for _, v := range module.Validators() {
|
||||
if v.Name() == "protected_glossary_terms" {
|
||||
if v.Name() == "protected_terms" {
|
||||
protectedValidator = v
|
||||
break
|
||||
}
|
||||
}
|
||||
if protectedValidator == nil {
|
||||
t.Fatal("expected protected_glossary_terms validator")
|
||||
t.Fatal("expected protected_terms validator")
|
||||
}
|
||||
|
||||
working := &schema.Transcript{Segments: []schema.Segment{
|
||||
|
||||
Reference in New Issue
Block a user