aboutsummaryrefslogtreecommitdiffstats
path: root/test/servicesSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2010-04-09 16:20:15 -0700
committerMisko Hevery2010-04-09 16:20:15 -0700
commit843bd355d25ebf2369aec79f98cb6704d38497e9 (patch)
tree3850d13b9ad8ab6c5dd975c20cf9d849c7429ed2 /test/servicesSpec.js
parent41a5c408c242269bf31bc0b774c7304fdf7c2f1c (diff)
downloadangular.js-843bd355d25ebf2369aec79f98cb6704d38497e9.tar.bz2
various bug fixes
Diffstat (limited to 'test/servicesSpec.js')
-rw-r--r--test/servicesSpec.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/servicesSpec.js b/test/servicesSpec.js
index b7dfe4c8..91cc1f0e 100644
--- a/test/servicesSpec.js
+++ b/test/servicesSpec.js
@@ -42,6 +42,20 @@ describe("services", function(){
expect(scope.$location.toString()).toEqual('file:///Users/Shared/misko/work/angular.js/scenario/widgets.html#');
});
+ it('should update url on hash change', function(){
+ scope.$location.parse('http://server/#path?a=b');
+ scope.$location.hash = '';
+ expect(scope.$location.toString()).toEqual('http://server/#');
+ expect(scope.$location.hashPath).toEqual('');
+ });
+
+ it('should update url on hashPath change', function(){
+ scope.$location.parse('http://server/#path?a=b');
+ scope.$location.hashPath = '';
+ expect(scope.$location.toString()).toEqual('http://server/#?a=b');
+ expect(scope.$location.hash).toEqual('?a=b');
+ });
+
xit('should add stylesheets', function(){
scope.$document = {
getElementsByTagName: function(name){