aboutsummaryrefslogtreecommitdiffstats
path: root/test/ng/rootScopeSpec.js
diff options
context:
space:
mode:
authorVojta Jina2012-04-27 13:14:46 +0200
committerVojta Jina2012-05-17 15:47:52 -0700
commit91db99208e197a73584a88a8d835eeb55c466335 (patch)
treee844e6cffe701626be49e3c3345a3af721b945a3 /test/ng/rootScopeSpec.js
parentacf095d1783e30e750d046ef24e81b5a0a31fbd4 (diff)
downloadangular.js-91db99208e197a73584a88a8d835eeb55c466335.tar.bz2
refactor(scope.$emit): rename event.cancel() to event.stopPropagation()
Breaks event.cancel() is event.stopPropagation()
Diffstat (limited to 'test/ng/rootScopeSpec.js')
-rw-r--r--test/ng/rootScopeSpec.js15
1 files changed, 2 insertions, 13 deletions
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;