File tree Expand file tree Collapse file tree
modules/angular2/test/core/forms Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -488,13 +488,24 @@ export function main() {
488488 a = new ControlArray ( [ c ] ) ;
489489 } ) ;
490490
491- it ( "should be false after creating a control" , ( ) => { expect ( a . pending ) . toEqual ( false ) ; } ) ;
491+ it ( "should be false after creating a control" , ( ) => {
492+ expect ( c . pending ) . toEqual ( false ) ;
493+ expect ( a . pending ) . toEqual ( false ) ;
494+ } ) ;
492495
493- it ( "should be false after changing the value of the control" , ( ) => {
496+ it ( "should be true after changing the value of the control" , ( ) => {
494497 c . markAsPending ( ) ;
495498
499+ expect ( c . pending ) . toEqual ( true ) ;
496500 expect ( a . pending ) . toEqual ( true ) ;
497501 } ) ;
502+
503+ it ( "should not update the parent when onlySelf = true" , ( ) => {
504+ c . markAsPending ( { onlySelf : true } ) ;
505+
506+ expect ( c . pending ) . toEqual ( true ) ;
507+ expect ( a . pending ) . toEqual ( false ) ;
508+ } ) ;
498509 } ) ;
499510
500511 describe ( "valueChanges" , ( ) => {
You can’t perform that action at this time.
0 commit comments