aboutsummaryrefslogtreecommitdiffstats
path: root/test/ScenarioSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2010-09-22 13:24:40 +0200
committerMisko Hevery2010-09-22 16:17:44 +0200
commit0649009624e8e7bd6fb39537f62c6f00facbfb16 (patch)
treee85077e148220ce75926bffce2d1e7daf8069945 /test/ScenarioSpec.js
parenteefb920d0e0345485a8eb120aeecc3b1aa9f6719 (diff)
downloadangular.js-0649009624e8e7bd6fb39537f62c6f00facbfb16.tar.bz2
Refactored the Browser:
- change from using prototype to inner functions to help with better compression - removed watchers (url/cookie) and introduced a poller concept - moved the checking of URL and cookie into services which register with poolers Benefits: - Smaller minified file - can call $browser.poll() from tests to simulate polling - single place where setTimeout needs to be tested - More testable $browser
Diffstat (limited to 'test/ScenarioSpec.js')
-rw-r--r--test/ScenarioSpec.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ScenarioSpec.js b/test/ScenarioSpec.js
index 7ea3192d..ede49a49 100644
--- a/test/ScenarioSpec.js
+++ b/test/ScenarioSpec.js
@@ -42,10 +42,10 @@ describe("ScenarioSpec: configuration", function(){
it("should take location object", function(){
var url = "http://server/#?book=moby";
var scope = compile("<div>{{$location}}</div>");
- var $location = scope.$get('$location');
+ var $location = scope.$location;
expect($location.hashSearch.book).toBeUndefined();
scope.$browser.setUrl(url);
- scope.$browser.fireUrlWatchers();
+ scope.$browser.poll();
expect($location.hashSearch.book).toEqual('moby');
});
});