From dbcc44dc80644e4390523ab33204b460f60648ec Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 22 Aug 2013 10:22:17 -0700 Subject: revert: feat(ngForm): Supports expression in form names This reverts commit 4407e81c618d42c70e8cfca4f52dfc4a669b5c68. No features or breaking changes in the stable branch please. --- test/ng/directive/formSpec.js | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) (limited to 'test') diff --git a/test/ng/directive/formSpec.js b/test/ng/directive/formSpec.js index b5bbe535..f8e4cf63 100644 --- a/test/ng/directive/formSpec.js +++ b/test/ng/directive/formSpec.js @@ -83,11 +83,10 @@ describe('form', function() { }); - it('should support expression in form name', function() { + it('should allow form name to be an expression', function() { doc = $compile('
')(scope); - expect(scope.obj).toBeDefined(); - expect(scope.obj.myForm).toBeTruthy(); + expect(scope['obj.myForm']).toBeTruthy(); }); @@ -326,30 +325,6 @@ describe('form', function() { }); - it('should deregister a child form whose name is an expression when its DOM is removed', function() { - doc = jqLite( - ''); - $compile(doc)(scope); - scope.$apply(); - - var parent = scope.parent, - child = scope.child.form; - - expect(parent).toBeDefined(); - expect(child).toBeDefined(); - expect(parent.$error.required).toEqual([child]); - doc.children().remove(); //remove child - - expect(parent.child).toBeUndefined(); - expect(scope.child.form).toBeUndefined(); - expect(parent.$error.required).toBe(false); - }); - - it('should deregister a input when its removed from DOM', function() { doc = jqLite( '