From b9a9f91fbf99b71cfde434b6277f4c7d2533556f Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Sat, 24 Nov 2012 01:51:19 +0100 Subject: 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 --- test/ngScenario/ApplicationSpec.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'test/ngScenario/ApplicationSpec.js') 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() { -- cgit v1.2.3