From 91db99208e197a73584a88a8d835eeb55c466335 Mon Sep 17 00:00:00 2001 From: Vojta Jina Date: Fri, 27 Apr 2012 13:14:46 +0200 Subject: refactor(scope.$emit): rename event.cancel() to event.stopPropagation() Breaks event.cancel() is event.stopPropagation() --- test/ng/rootScopeSpec.js | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'test/ng/rootScopeSpec.js') diff --git a/test/ng/rootScopeSpec.js b/test/ng/rootScopeSpec.js index 35be7a2f..3faeb162 100644 --- a/test/ng/rootScopeSpec.js +++ b/test/ng/rootScopeSpec.js @@ -668,8 +668,8 @@ describe('Scope', function() { })); - it('should allow cancelation of event propagation', function() { - child.$on('myEvent', function(event) { event.cancel(); }); + it('should allow stopping event propagation', function() { + child.$on('myEvent', function(event) { event.stopPropagation(); }); grandChild.$emit('myEvent'); expect(log).toEqual('2>1>'); }); @@ -685,17 +685,6 @@ describe('Scope', function() { }); - it('should return event object with cancelled property', function() { - child.$on('some', function(event) { - event.cancel(); - }); - - var result = grandChild.$emit('some'); - expect(result).toBeDefined(); - expect(result.cancelled).toBe(true); - }); - - describe('event object', function() { it('should have methods/properties', function() { var event; -- cgit v1.2.3