aboutsummaryrefslogtreecommitdiffstats
path: root/test/servicesSpec.js
diff options
context:
space:
mode:
authorMisko Hevery2010-05-13 12:03:10 -0700
committerMisko Hevery2010-05-13 12:03:10 -0700
commit4b9b9e98300b9554faf0c960674eb75750227404 (patch)
tree9ed8ef7e8b499178dcce5e0133546c7dbea3dd3f /test/servicesSpec.js
parent271b535c8285cb90781bf1e8ee56d6e68210a6a9 (diff)
downloadangular.js-4b9b9e98300b9554faf0c960674eb75750227404.tar.bz2
fix incorect parsing of url if it contains dash - character
Diffstat (limited to 'test/servicesSpec.js')
-rw-r--r--test/servicesSpec.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/servicesSpec.js b/test/servicesSpec.js
index de2d2b2b..17f71bdc 100644
--- a/test/servicesSpec.js
+++ b/test/servicesSpec.js
@@ -88,6 +88,14 @@ describe("service", function(){
expect(log).toEqual('/abc;');
});
+ it("should parse url which contains - in host", function(){
+ scope.$location.parse('http://a-b1.c-d.09/path');
+ expect(scope.$location.href).toEqual('http://a-b1.c-d.09/path');
+ expect(scope.$location.protocol).toEqual('http');
+ expect(scope.$location.host).toEqual('a-b1.c-d.09');
+ expect(scope.$location.path).toEqual('/path');
+ });
+
});
describe("$invalidWidgets", function(){
@@ -255,5 +263,3 @@ describe("service", function(){
});
-
-