aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorIgor Minar2012-11-24 01:51:19 +0100
committerIgor Minar2012-11-26 16:03:43 +0100
commit269fb43b3667c74b35980798fd54937d65b7b7de (patch)
tree9ddfebe952a12c31658333597a21536b119a367b /test
parent7530654328ae508bdd05d273ba4c4e04c90744b3 (diff)
downloadangular.js-269fb43b3667c74b35980798fd54937d65b7b7de.tar.bz2
fix(jqLite): fire $destroy event via triggerHandler
in jQuery 1.8.x the data() data structure is changed and events are not accessible via data().events. Since all we need is to trigger all event handlers, we can do so via triggerHandler() api instead of mocking with the internal jQuery data structures. This fix was originally proposed by PeteAppleton via PR #1512. Closes #1512
Diffstat (limited to 'test')
-rw-r--r--test/ngScenario/ApplicationSpec.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/test/ngScenario/ApplicationSpec.js b/test/ngScenario/ApplicationSpec.js
index 7384ecaa..0236b8d7 100644
--- a/test/ngScenario/ApplicationSpec.js
+++ b/test/ngScenario/ApplicationSpec.js
@@ -5,10 +5,7 @@ describe('angular.scenario.Application', function() {
var app, frames;
function callLoadHandlers(app) {
- var handlers = app.getFrame_().data('events').load;
- expect(handlers).toBeDefined();
- expect(handlers.length).toEqual(1);
- handlers[0].handler();
+ var handler = app.getFrame_().triggerHandler('load')
}
beforeEach(function() {