From 1752c8c44a7058e974ef208e583683eac8817789 Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Mon, 6 Feb 2012 21:56:35 -0800 Subject: feat(directive): event now accessible as $event Closes 259 --- test/directivesSpec.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'test/directivesSpec.js') diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 9dee4860..45f1cffc 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -137,15 +137,12 @@ describe("directive", function() { expect($rootScope.clicked).toEqual(true); })); - it('should stop event propagation', inject(function($rootScope, $compile) { - element = $compile('
')($rootScope); + it('should pass event object', inject(function($rootScope, $compile) { + element = $compile('
')($rootScope); $rootScope.$digest(); - expect($rootScope.outer).not.toBeDefined(); - expect($rootScope.inner).not.toBeDefined(); - browserTrigger(element.find('div'), 'click'); - expect($rootScope.outer).not.toBeDefined(); - expect($rootScope.inner).toEqual(true); + browserTrigger(element, 'click'); + expect($rootScope.event).toBeDefined(); })); }); -- cgit v1.2.3