test(location): should not rewrite Html5 deep urls

This commit is contained in:
Pete Bacon Darwin 2013-04-23 11:12:16 +01:00
parent 5a8ae94f9c
commit 0fbf584643

View file

@ -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/');