From f54db2ccda399f2677e4ca7588018cb31545a2b4 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Thu, 8 Mar 2012 15:00:38 -0800 Subject: chore(directives,widgets): reorg the code under directive/ dir --- test/directive/ngEventDirsSpec.js | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 test/directive/ngEventDirsSpec.js (limited to 'test/directive/ngEventDirsSpec.js') diff --git a/test/directive/ngEventDirsSpec.js b/test/directive/ngEventDirsSpec.js new file mode 100644 index 00000000..2b14bb33 --- /dev/null +++ b/test/directive/ngEventDirsSpec.js @@ -0,0 +1,25 @@ +'use strict'; + +describe('event directives', function() { + var element; + + + afterEach(function() { + dealoc(element); + }); + + + describe('ng:submit', function() { + + it('should get called on form submit', inject(function($rootScope, $compile) { + element = $compile('
')($rootScope); + $rootScope.$digest(); + expect($rootScope.submitted).not.toBeDefined(); + + browserTrigger(element.children()[0]); + expect($rootScope.submitted).toEqual(true); + })); + }); +}); -- cgit v1.2.3