From 2a30a02f015dd54846bb62d1f05e82b3cf76ef9f Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Tue, 27 Jul 2010 15:54:50 -0700 Subject: fix preventDefault for events --- test/directivesSpec.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'test/directivesSpec.js') diff --git a/test/directivesSpec.js b/test/directivesSpec.js index 8a7da41d..278f9c4c 100644 --- a/test/directivesSpec.js +++ b/test/directivesSpec.js @@ -160,13 +160,15 @@ describe("directives", function(){ expect(scope.$get('count')).toEqual(1); }); - it('should ng:click', function(){ - var scope = compile('
'); - scope.$eval(); - expect(scope.$get('clicked')).toBeFalsy(); + describe('ng:click', function(){ + it('should fire event', function(){ + var scope = compile(''); + scope.$eval(); + expect(scope.$get('clicked')).toBeFalsy(); - element.trigger('click'); - expect(scope.$get('clicked')).toEqual(true); + element.trigger('click'); + expect(scope.$get('clicked')).toEqual(true); + }); }); it('should ng:class', function(){ -- cgit v1.2.3