@@ -4161,10 +4161,14 @@ describe('input', function() {
4161
4161
} ) ;
4162
4162
4163
4163
it ( 'should validate even if min value changes on-the-fly' , function ( ) {
4164
- scope . min = 10 ;
4164
+ scope . min = undefined ;
4165
4165
compileInput ( '<input type="number" ng-model="value" name="alias" min="{{min}}" />' ) ;
4166
+ expect ( inputElm ) . toBeValid ( ) ;
4166
4167
4167
4168
changeInputValueTo ( '15' ) ;
4169
+
4170
+ scope . min = 10 ;
4171
+ scope . $digest ( ) ;
4168
4172
expect ( inputElm ) . toBeValid ( ) ;
4169
4173
4170
4174
scope . min = 20 ;
@@ -4202,10 +4206,14 @@ describe('input', function() {
4202
4206
} ) ;
4203
4207
4204
4208
it ( 'should validate even if the ngMin value changes on-the-fly' , function ( ) {
4205
- scope . min = 10 ;
4209
+ scope . min = undefined ;
4206
4210
compileInput ( '<input type="number" ng-model="value" name="alias" ng-min="min" />' ) ;
4211
+ expect ( inputElm ) . toBeValid ( ) ;
4207
4212
4208
4213
changeInputValueTo ( '15' ) ;
4214
+
4215
+ scope . min = 10 ;
4216
+ scope . $digest ( ) ;
4209
4217
expect ( inputElm ) . toBeValid ( ) ;
4210
4218
4211
4219
scope . min = 20 ;
@@ -4244,10 +4252,14 @@ describe('input', function() {
4244
4252
} ) ;
4245
4253
4246
4254
it ( 'should validate even if max value changes on-the-fly' , function ( ) {
4247
- scope . max = 10 ;
4255
+ scope . max = undefined ;
4248
4256
compileInput ( '<input type="number" ng-model="value" name="alias" max="{{max}}" />' ) ;
4257
+ expect ( inputElm ) . toBeValid ( ) ;
4249
4258
4250
4259
changeInputValueTo ( '5' ) ;
4260
+
4261
+ scope . max = 10 ;
4262
+ scope . $digest ( ) ;
4251
4263
expect ( inputElm ) . toBeValid ( ) ;
4252
4264
4253
4265
scope . max = 0 ;
@@ -4285,10 +4297,14 @@ describe('input', function() {
4285
4297
} ) ;
4286
4298
4287
4299
it ( 'should validate even if the ngMax value changes on-the-fly' , function ( ) {
4288
- scope . max = 10 ;
4300
+ scope . max = undefined ;
4289
4301
compileInput ( '<input type="number" ng-model="value" name="alias" ng-max="max" />' ) ;
4302
+ expect ( inputElm ) . toBeValid ( ) ;
4290
4303
4291
4304
changeInputValueTo ( '5' ) ;
4305
+
4306
+ scope . max = 10 ;
4307
+ scope . $digest ( ) ;
4292
4308
expect ( inputElm ) . toBeValid ( ) ;
4293
4309
4294
4310
scope . max = 0 ;
0 commit comments