@@ -32,6 +32,7 @@ describe('state', function () {
32
32
RSP = { url : '^/:doReload/search?term' , reloadOnSearch : false } ,
33
33
OPT = { url : '/opt/:param' , params : { param : "100" } } ,
34
34
OPT2 = { url : '/opt2/:param2/:param3' , params : { param3 : "300" , param4 : "400" } } ,
35
+ ISS2101 = { params : { bar : { squash : false , value : 'qux' } } , url : '/2101/{bar:string}' } ;
35
36
AppInjectable = { } ;
36
37
37
38
beforeEach ( module ( function ( $stateProvider , $provide ) {
@@ -55,6 +56,7 @@ describe('state', function () {
55
56
. state ( 'HHH' , HHH )
56
57
. state ( 'OPT' , OPT )
57
58
. state ( 'OPT.OPT2' , OPT2 )
59
+ . state ( 'ISS2101' , ISS2101 )
58
60
. state ( 'RS' , RS )
59
61
. state ( 'RSP' , RSP )
60
62
@@ -931,6 +933,10 @@ describe('state', function () {
931
933
expect ( $state . href ( "home" ) ) . toEqual ( "#!/" ) ;
932
934
} ) ) ;
933
935
936
+ it ( 'generates urls with unsquashable default params' , inject ( function ( $state ) {
937
+ expect ( $state . href ( "ISS2101" ) ) . toEqual ( "#/2101/qux" ) ;
938
+ } ) ) ;
939
+
934
940
describe ( 'when $browser.baseHref() exists' , function ( ) {
935
941
beforeEach ( inject ( function ( $browser ) {
936
942
spyOn ( $browser , 'baseHref' ) . andCallFake ( function ( ) {
@@ -977,6 +983,7 @@ describe('state', function () {
977
983
'H' ,
978
984
'HH' ,
979
985
'HHH' ,
986
+ 'ISS2101' ,
980
987
'OPT' ,
981
988
'OPT.OPT2' ,
982
989
'RS' ,
0 commit comments