Skip to content

Commit f46bcb7

Browse files
committed
test: ensure makeAddSurveyValidation calls ValidationComposite with LengthFieldValidation
1 parent cd6849c commit f46bcb7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/main/factories/controllers/add-survey-validation-factory.spec.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import {
33
MultipleValuesValidation,
44
RequiredFieldValidation,
55
ValidationComposite,
6+
LengthFieldValidation,
67
} from '@/validation/validators';
78
import { makeAddSurveyValidation } from '@/main/factories';
89

@@ -18,6 +19,7 @@ describe('AddSurveyValidation Factory', () => {
1819
new RequiredFieldValidation(['answer']),
1920
])
2021
);
22+
validations.push(new LengthFieldValidation('answers', 2));
2123
expect(ValidationComposite).toHaveBeenCalledWith(validations);
2224
});
2325
});

0 commit comments

Comments
 (0)