diff options
| author | Igor Minar | 2013-08-22 10:22:17 -0700 |
|---|---|---|
| committer | Igor Minar | 2013-08-22 10:22:17 -0700 |
| commit | dbcc44dc80644e4390523ab33204b460f60648ec (patch) | |
| tree | 7a74ed4e80b5c360ff6ee282a2d05da1ba187f9b /test/ng/directive/formSpec.js | |
| parent | db87fd52cafa28c13ae0642b91f9a30f0301f257 (diff) | |
| download | angular.js-dbcc44dc80644e4390523ab33204b460f60648ec.tar.bz2 | |
revert: feat(ngForm): Supports expression in form names
This reverts commit 4407e81c618d42c70e8cfca4f52dfc4a669b5c68.
No features or breaking changes in the stable branch please.
Diffstat (limited to 'test/ng/directive/formSpec.js')
| -rw-r--r-- | test/ng/directive/formSpec.js | 29 |
1 files changed, 2 insertions, 27 deletions
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('<form name="obj.myForm"></form>')(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( - '<form name="parent">' + - '<div class="ng-form" name="child.form">' + - '<input ng:model="modelA" name="inputA" required>' + - '</div>' + - '</form>'); - $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( '<form name="parent">' + |
