diff options
| author | Andres Ornelas | 2010-08-04 11:45:42 -0700 |
|---|---|---|
| committer | Andres Ornelas | 2010-08-04 11:45:42 -0700 |
| commit | ec12285c9d213a50b86b2ff8d968686acd6d1693 (patch) | |
| tree | 94c0792946bfa461c4fab525b3758b06c6da9f9f /test/servicesSpec.js | |
| parent | ef88eb9a71ee7666029c4fb5eb731ce2e986cecc (diff) | |
| parent | 89245f3a527415a80d46b37054b558454c314532 (diff) | |
| download | angular.js-ec12285c9d213a50b86b2ff8d968686acd6d1693.tar.bz2 | |
Merge branch 'master' of github.com:angular/angular.js into future
Diffstat (limited to 'test/servicesSpec.js')
| -rw-r--r-- | test/servicesSpec.js | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/test/servicesSpec.js b/test/servicesSpec.js index 91538703..ffd01267 100644 --- a/test/servicesSpec.js +++ b/test/servicesSpec.js @@ -91,7 +91,7 @@ describe("service", function(){ scope.$location.hashPath = 'page=http://path'; scope.$location.hashSearch = {k:'a=b'}; - expect(scope.$location.toString()).toEqual('http://host:123/p/a/t/h.html?query=value#page=http://path?k=a%3Db'); + expect(scope.$location.toString()).toEqual('http://host:123/p/a/t/h.html?query=value#page%3Dhttp%3A//path?k=a%3Db'); }); it('should parse file://', function(){ @@ -106,7 +106,7 @@ describe("service", function(){ expect(scope.$location.hashPath).toEqual(''); expect(scope.$location.hashSearch).toEqual({}); - expect(scope.$location.toString()).toEqual('file:///Users/Shared/misko/work/angular.js/scenario/widgets.html#'); + expect(scope.$location.toString()).toEqual('file:///Users/Shared/misko/work/angular.js/scenario/widgets.html'); }); it('should update url on hash change', function(){ @@ -123,6 +123,14 @@ describe("service", function(){ expect(scope.$location.hash).toEqual('?a=b'); }); + 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'); + }); + it('should update hash before any processing', function(){ var scope = compile('<div>'); var log = ''; @@ -136,15 +144,6 @@ describe("service", function(){ scope.$eval(); 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(){ |
