aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/ApplicationSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/scenario/ApplicationSpec.js')
-rw-r--r--test/scenario/ApplicationSpec.js13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/scenario/ApplicationSpec.js b/test/scenario/ApplicationSpec.js
index 706fbc36..2fb9881f 100644
--- a/test/scenario/ApplicationSpec.js
+++ b/test/scenario/ApplicationSpec.js
@@ -18,20 +18,21 @@ describe('angular.scenario.Application', function() {
testDocument = $document;
});
app.navigateTo('http://www.google.com/');
- app.executeAction(function($document, $window) {
+ app.executeAction(function($window, $document) {
expect($window).not.toEqual(testWindow);
expect($document).not.toEqual(testDocument);
});
});
- it('should execute callback on $window of frame', function() {
+ it('should execute callback with correct arguments', function() {
var testWindow = {document: {}};
app.getWindow = function() {
return testWindow;
};
- app.executeAction(function($document, $window) {
- expect(this).toEqual($window);
- expect(this).toEqual(testWindow);
+ app.executeAction(function($window, $document) {
+ expect(this).toEqual(app);
+ expect($document).toEqual(_jQuery($window.document));
+ expect($window).toEqual(testWindow);
});
});
@@ -52,7 +53,7 @@ describe('angular.scenario.Application', function() {
it('should call onload handler when frame loads', function() {
var called;
- app.getFrame = function() {
+ app.getFrame = function() {
// Mock a little jQuery
var result = {
remove: function() {