From 0fbf584643bc52a11b50f6b1b563cc1b55a268c1 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Tue, 23 Apr 2013 11:12:16 +0100 Subject: [PATCH] test(location): should not rewrite Html5 deep urls --- test/ng/locationSpec.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/ng/locationSpec.js b/test/ng/locationSpec.js index 80addb95eb4f..bb0659a5d0bb 100644 --- a/test/ng/locationSpec.js +++ b/test/ng/locationSpec.js @@ -177,6 +177,15 @@ describe('$location', function() { expect(url.absUrl()).toBe('http://www.domain.com:9877/a'); }); + it('should not rewrite when hashbang url is not given', function() { + initService(true, '!', true); + inject( + initBrowser('http://domain.com/base/a/b', '/base'), + function($rootScope, $location, $browser) { + expect($browser.url()).toBe('http://domain.com/base/a/b'); + } + ); + }); it('should prepend path with basePath', function() { url = new LocationHtml5Url('http://server/base/');