aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/ApplicationSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2011-11-08 17:40:52 -0800
committerMisko Hevery2011-11-14 20:31:15 -0800
commit9c0639437607a4fcea379bbaf610600d05d8a9b7 (patch)
tree1ae90d93d0139f7791487fe814360904254d39cb /test/scenario/ApplicationSpec.js
parent085e3c611fd0cd48757702c50c67b551a00a0d38 (diff)
downloadangular.js-9c0639437607a4fcea379bbaf610600d05d8a9b7.tar.bz2
chore(scenario tests): make scenario tests pass again
Diffstat (limited to 'test/scenario/ApplicationSpec.js')
-rw-r--r--test/scenario/ApplicationSpec.js17
1 files changed, 8 insertions, 9 deletions
diff --git a/test/scenario/ApplicationSpec.js b/test/scenario/ApplicationSpec.js
index 8caf1651..86023438 100644
--- a/test/scenario/ApplicationSpec.js
+++ b/test/scenario/ApplicationSpec.js
@@ -112,22 +112,20 @@ describe('angular.scenario.Application', function() {
expect(called).toBeTruthy();
});
- it('should wait for pending requests in executeAction', function() {
+ it('should wait for pending requests in executeAction', inject(function($injector, $browser) {
var called, polled;
var handlers = [];
var testWindow = {
- document: _jQuery('<div class="test-foo"></div>'),
+ document: jqLite('<div class="test-foo"></div>'),
angular: {
+ element: jqLite,
service: {}
}
};
- testWindow.angular.service.$browser = function() {
- return {
- notifyWhenNoOutstandingRequests: function(fn) {
- handlers.push(fn);
- }
- };
+ $browser.notifyWhenNoOutstandingRequests = function(fn) {
+ handlers.push(fn);
};
+ testWindow.document.data('$injector', $injector);
app.getWindow_ = function() {
return testWindow;
};
@@ -138,5 +136,6 @@ describe('angular.scenario.Application', function() {
});
expect(handlers.length).toEqual(1);
handlers[0]();
- });
+ dealoc(testWindow.document);
+ }));
});