aboutsummaryrefslogtreecommitdiffstats
path: root/test/ngScenario/ApplicationSpec.js
diff options
context:
space:
mode:
authorIgor Minar2012-11-24 01:51:19 +0100
committerIgor Minar2012-11-26 15:45:04 +0100
commitb9a9f91fbf99b71cfde434b6277f4c7d2533556f (patch)
tree9edce6ac7329905c8dac9d5db1280721a1b889a3 /test/ngScenario/ApplicationSpec.js
parent650fd933df614ac733cd43fe31d81d622a2ce2bc (diff)
downloadangular.js-b9a9f91fbf99b71cfde434b6277f4c7d2533556f.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/ngScenario/ApplicationSpec.js')
-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() {