@@ -15,8 +15,7 @@ describe('uiStateRef', function() {
15
15
url : '/contacts' ,
16
16
template : '<a ui-sref=".item({ id: 5 })" class="item">Person</a> <ui-view></ui-view>'
17
17
} ) . state ( 'contacts.item' , {
18
- url : '/:id' ,
19
- params : { id : null } ,
18
+ url : '/{id:int}' ,
20
19
template : '<a ui-sref=".detail" class="item-detail">Detail</a> | <a ui-sref="^" class="item-parent">Parent</a> | <ui-view></ui-view>'
21
20
} ) . state ( 'contacts.item.detail' , {
22
21
template : '<div class="title">Detail</div> | <a ui-sref="^" class="item-parent2">Item</a>'
@@ -134,7 +133,7 @@ describe('uiStateRef', function() {
134
133
$q . flush ( ) ;
135
134
136
135
expect ( $state . current . name ) . toEqual ( 'contacts.item.detail' ) ;
137
- expect ( obj ( $stateParams ) ) . toEqualData ( { id : "5" } ) ;
136
+ expect ( obj ( $stateParams ) ) . toEqualData ( { id : 5 } ) ;
138
137
} ) ) ;
139
138
140
139
it ( 'should transition when given a click that contains no data (fake-click)' , inject ( function ( $state , $stateParams , $q ) {
@@ -151,7 +150,7 @@ describe('uiStateRef', function() {
151
150
$q . flush ( ) ;
152
151
153
152
expect ( $state . current . name ) . toEqual ( 'contacts.item.detail' ) ;
154
- expect ( obj ( $stateParams ) ) . toEqualData ( { id : "5" } ) ;
153
+ expect ( obj ( $stateParams ) ) . toEqualData ( { id : 5 } ) ;
155
154
} ) ) ;
156
155
157
156
it ( 'should not transition states when ctrl-clicked' , inject ( function ( $state , $stateParams , $q ) {
@@ -404,7 +403,7 @@ describe('uiStateRef', function() {
404
403
$q . flush ( ) ;
405
404
406
405
expect ( $state . $current . name ) . toBe ( "contacts.item.detail" ) ;
407
- expect ( obj ( $state . params ) ) . toEqualData ( { id : "5" } ) ;
406
+ expect ( obj ( $state . params ) ) . toEqualData ( { id : 5 } ) ;
408
407
} ) ) ;
409
408
410
409
it ( 'should resolve states from parent uiView' , inject ( function ( $state , $stateParams , $q , $timeout ) {
0 commit comments