diff options
| author | Misko Hevery | 2012-02-06 21:56:35 -0800 | 
|---|---|---|
| committer | Misko Hevery | 2012-02-21 22:46:00 -0800 | 
| commit | 1752c8c44a7058e974ef208e583683eac8817789 (patch) | |
| tree | a8d49ecfd96e739f2de12a9b71385b46ad3c0cf7 /test/directivesSpec.js | |
| parent | 6216dc046510204bafd159dba17ce0cc22db6c08 (diff) | |
| download | angular.js-1752c8c44a7058e974ef208e583683eac8817789.tar.bz2 | |
feat(directive): event now accessible as $event
Closes 259
Diffstat (limited to 'test/directivesSpec.js')
| -rw-r--r-- | test/directivesSpec.js | 11 | 
1 files changed, 4 insertions, 7 deletions
| 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('<div ng:click="outer = true"><div ng:click="inner = true"></div></div>')($rootScope); +    it('should pass event object', inject(function($rootScope, $compile) { +      element = $compile('<div ng:click="event = $event"></div>')($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();      }));    }); | 
