From 28db8646901e0aedcd8892e45ed00de86627fb78 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Mon, 26 Oct 2015 11:50:30 -0700 Subject: [PATCH] cleanup(forms): add missing tests --- modules/angular2/test/core/forms/model_spec.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/modules/angular2/test/core/forms/model_spec.ts b/modules/angular2/test/core/forms/model_spec.ts index 460a2b8a19..039e8dccce 100644 --- a/modules/angular2/test/core/forms/model_spec.ts +++ b/modules/angular2/test/core/forms/model_spec.ts @@ -488,13 +488,24 @@ export function main() { a = new ControlArray([c]); }); - it("should be false after creating a control", () => { expect(a.pending).toEqual(false); }); + it("should be false after creating a control", () => { + expect(c.pending).toEqual(false); + expect(a.pending).toEqual(false); + }); - it("should be false after changing the value of the control", () => { + it("should be true after changing the value of the control", () => { c.markAsPending(); + expect(c.pending).toEqual(true); expect(a.pending).toEqual(true); }); + + it("should not update the parent when onlySelf = true", () => { + c.markAsPending({onlySelf: true}); + + expect(c.pending).toEqual(true); + expect(a.pending).toEqual(false); + }); }); describe("valueChanges", () => {