'use strict'; describe('form', function() { var doc; afterEach(function() { dealoc(doc); }); it('should attach form to DOM', inject(function($rootScope, $compile) { doc = angular.element('
'); $compile(doc)($rootScope); doc.bind('submit', callback); browserTrigger(doc, 'submit'); expect(callback).toHaveBeenCalledOnce(); })); it('should publish form to scope', inject(function($rootScope, $compile) { doc = angular.element(''); $compile(doc)($rootScope); expect($rootScope.myForm).toBeTruthy(); expect(doc.data('$form')).toBeTruthy(); expect(doc.data('$form')).toEqual($rootScope.myForm); })); it('should have ng-valide/ng-invalid style', inject(function($rootScope, $compile) { doc = angular.element('