@@ -33,30 +33,19 @@ export function main() {
3333
3434 beforeEach ( makeLocation ) ;
3535
36- it ( 'should normalize relative urls on navigate' , ( ) => {
37- location . go ( 'user/btford' ) ;
38- expect ( locationStrategy . path ( ) ) . toEqual ( '/my/app/user/btford' ) ;
39- } ) ;
40-
4136 it ( 'should not prepend urls with starting slash when an empty URL is provided' ,
42- ( ) => { expect ( location . normalizeAbsolutely ( '' ) ) . toEqual ( locationStrategy . getBaseHref ( ) ) ; } ) ;
37+ ( ) => { expect ( location . prepareExternalUrl ( '' ) ) . toEqual ( locationStrategy . getBaseHref ( ) ) ; } ) ;
4338
4439 it ( 'should not prepend path with an extra slash when a baseHref has a trailing slash' , ( ) => {
4540 let location = makeLocation ( '/my/slashed/app/' ) ;
46- expect ( location . normalizeAbsolutely ( '/page' ) ) . toEqual ( '/my/slashed/app/page' ) ;
41+ expect ( location . prepareExternalUrl ( '/page' ) ) . toEqual ( '/my/slashed/app/page' ) ;
4742 } ) ;
4843
4944 it ( 'should not append urls with leading slash on navigate' , ( ) => {
5045 location . go ( '/my/app/user/btford' ) ;
5146 expect ( locationStrategy . path ( ) ) . toEqual ( '/my/app/user/btford' ) ;
5247 } ) ;
5348
54- it ( 'should remove index.html from base href' , ( ) => {
55- let location = makeLocation ( '/my/app/index.html' ) ;
56- location . go ( 'user/btford' ) ;
57- expect ( locationStrategy . path ( ) ) . toEqual ( '/my/app/user/btford' ) ;
58- } ) ;
59-
6049 it ( 'should normalize urls on popstate' , inject ( [ AsyncTestCompleter ] , ( async ) => {
6150 locationStrategy . simulatePopState ( '/my/app/user/btford' ) ;
6251 location . subscribe ( ( ev ) => {
@@ -65,17 +54,6 @@ export function main() {
6554 } )
6655 } ) ) ;
6756
68- it ( 'should normalize location path' , ( ) => {
69- locationStrategy . internalPath = '/my/app/user/btford' ;
70- expect ( location . path ( ) ) . toEqual ( '/user/btford' ) ;
71- } ) ;
72-
73- it ( 'should use optional base href param' , ( ) => {
74- let location = makeLocation ( '/' , provide ( APP_BASE_HREF , { useValue : '/my/custom/href' } ) ) ;
75- location . go ( 'user/btford' ) ;
76- expect ( locationStrategy . path ( ) ) . toEqual ( '/my/custom/href/user/btford' ) ;
77- } ) ;
78-
7957 it ( 'should throw when no base href is provided' , ( ) => {
8058 var locationStrategy = new MockLocationStrategy ( ) ;
8159 locationStrategy . internalBaseHref = null ;
0 commit comments