diff --git a/test/ng/directive/formSpec.js b/test/ng/directive/formSpec.js index 8b87f266..fa047480 100644 --- a/test/ng/directive/formSpec.js +++ b/test/ng/directive/formSpec.js @@ -64,36 +64,6 @@ describe('form', function() { }); - it('should prevent form submission', function() { - var startingUrl = '' + window.location; - doc = jqLite('
')(scope); - doc.bind('submit', callback); - - browserTrigger(doc, 'submit'); - expect(callback).toHaveBeenCalledOnce(); - }); - - it('should publish form to scope when name attr is defined', function() { doc = $compile('')(scope); expect(scope.myForm).toBeTruthy(); @@ -155,6 +125,39 @@ describe('form', function() { }); + describe('preventing default submission', function() { + + it('should prevent form submission', function() { + var startingUrl = '' + window.location; + doc = jqLite('')(scope); + doc.bind('submit', callback); + + browserTrigger(doc, 'submit'); + expect(callback).toHaveBeenCalledOnce(); + }); + }); + + describe('nested forms', function() { it('should chain nested forms', function() {