aboutsummaryrefslogtreecommitdiffstats
path: root/test/scenario/dslSpec.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/scenario/dslSpec.js')
-rw-r--r--test/scenario/dslSpec.js22
1 files changed, 12 insertions, 10 deletions
diff --git a/test/scenario/dslSpec.js b/test/scenario/dslSpec.js
index 29956801..1b0d613c 100644
--- a/test/scenario/dslSpec.js
+++ b/test/scenario/dslSpec.js
@@ -11,7 +11,7 @@ describe("angular.scenario.dsl", function() {
angular: new angular.scenario.testing.MockAngular()
};
$window.document.data('$injector', $injector);
- $root = $injector('$rootScope');
+ $root = $injector.get('$rootScope');
$root.emit = function(eventName) {
eventLog.push(eventName);
};
@@ -162,16 +162,18 @@ describe("angular.scenario.dsl", function() {
describe('location', function() {
beforeEach(function() {
$window.angular.injector = function() {
- return function(serviceId) {
- if (serviceId == '$location') {
- return {
- url: function() {return '/path?search=a#hhh';},
- path: function() {return '/path';},
- search: function() {return {search: 'a'};},
- hash: function() {return 'hhh';}
- };
+ return {
+ get: function(serviceId) {
+ if (serviceId == '$location') {
+ return {
+ url: function() {return '/path?search=a#hhh';},
+ path: function() {return '/path';},
+ search: function() {return {search: 'a'};},
+ hash: function() {return 'hhh';}
+ };
+ }
+ throw new Error('unknown service id ' + serviceId);
}
- throw new Error('unknown service id ' + serviceId);
};
};
});