File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -733,6 +733,19 @@ describe('input', function() {
733
733
changeInputValueTo ( 'aaa' ) ;
734
734
expect ( scope . value ) . toBe ( 'aaa' ) ;
735
735
} ) ;
736
+
737
+
738
+ it ( 'should be updatable via binding' , function ( ) {
739
+ scope . boundLength = 3 ;
740
+ compileInput ( '<input type="text" ng-model="value" ng-minlength="boundLength" />' ) ;
741
+
742
+ changeInputValueTo ( 'aaa' ) ;
743
+ expect ( scope . value ) . toBe ( 'aaa' ) ;
744
+
745
+ scope . boundLength = 6 ;
746
+ scope . $digest ( ) ;
747
+ expect ( scope . value ) . toBeUndefined ( ) ;
748
+ } ) ;
736
749
} ) ;
737
750
738
751
@@ -747,6 +760,19 @@ describe('input', function() {
747
760
changeInputValueTo ( 'aaa' ) ;
748
761
expect ( scope . value ) . toBe ( 'aaa' ) ;
749
762
} ) ;
763
+
764
+
765
+ it ( 'should be updatable via binding' , function ( ) {
766
+ scope . boundLength = 6 ;
767
+ compileInput ( '<input type="text" ng-model="value" ng-maxlength="boundLength" />' ) ;
768
+
769
+ changeInputValueTo ( 'aaa' ) ;
770
+ expect ( scope . value ) . toBe ( 'aaa' ) ;
771
+
772
+ scope . boundLength = 3 ;
773
+ scope . $digest ( ) ;
774
+ expect ( scope . value ) . toBeUndefined ( ) ;
775
+ } ) ;
750
776
} ) ;
751
777
752
778
You can’t perform that action at this time.
0 commit comments