File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -57,5 +57,22 @@ void main() {
57
57
// Assert
58
58
expect (result, isNull);
59
59
});
60
+
61
+ test (
62
+ 'should return the default error message if the value is true and no custom message is set' ,
63
+ () {
64
+ // Arrange
65
+ const IsFalseValidator validator = IsFalseValidator ();
66
+ const bool value = true ;
67
+
68
+ // Act
69
+ final String ? result = validator.validate (value);
70
+
71
+ // Assert
72
+ expect (
73
+ result,
74
+ equals (FormBuilderLocalizations .current.mustBeFalseErrorText),
75
+ );
76
+ });
60
77
});
61
78
}
Original file line number Diff line number Diff line change @@ -57,5 +57,22 @@ void main() {
57
57
// Assert
58
58
expect (result, isNull);
59
59
});
60
+
61
+ test (
62
+ 'should return the default error message if the value is true and no custom message is set' ,
63
+ () {
64
+ // Arrange
65
+ const IsTrueValidator validator = IsTrueValidator ();
66
+ const bool value = false ;
67
+
68
+ // Act
69
+ final String ? result = validator.validate (value);
70
+
71
+ // Assert
72
+ expect (
73
+ result,
74
+ equals (FormBuilderLocalizations .current.mustBeTrueErrorText),
75
+ );
76
+ });
60
77
});
61
78
}
You can’t perform that action at this time.
0 commit comments