@@ -12,7 +12,7 @@ describe('uiStateRef', function() {
12
12
url : '/contacts' ,
13
13
template : '<a ui-sref=".item({ id: 5 })" class="item">Person</a> <ui-view></ui-view>'
14
14
} ) . state ( 'contacts.item' , {
15
- url : '/:id ' ,
15
+ url : '/{id:int} ' ,
16
16
template : '<a ui-sref=".detail" class="item-detail">Detail</a> | <a ui-sref="^" class="item-parent">Parent</a> | <ui-view></ui-view>'
17
17
} ) . state ( 'contacts.item.detail' , {
18
18
template : '<div class="title">Detail</div> | <a ui-sref="^" class="item-parent2">Item</a>'
@@ -130,7 +130,7 @@ describe('uiStateRef', function() {
130
130
$q . flush ( ) ;
131
131
132
132
expect ( $state . current . name ) . toEqual ( 'contacts.item.detail' ) ;
133
- expect ( $stateParams ) . toEqual ( { id : "5" } ) ;
133
+ expect ( $stateParams ) . toEqual ( { id : 5 } ) ;
134
134
} ) ) ;
135
135
136
136
it ( 'should transition when given a click that contains no data (fake-click)' , inject ( function ( $state , $stateParams , $q ) {
@@ -147,7 +147,7 @@ describe('uiStateRef', function() {
147
147
$q . flush ( ) ;
148
148
149
149
expect ( $state . current . name ) . toEqual ( 'contacts.item.detail' ) ;
150
- expect ( $stateParams ) . toEqual ( { id : "5" } ) ;
150
+ expect ( $stateParams ) . toEqual ( { id : 5 } ) ;
151
151
} ) ) ;
152
152
153
153
it ( 'should not transition states when ctrl-clicked' , inject ( function ( $state , $stateParams , $q ) {
@@ -393,7 +393,7 @@ describe('uiStateRef', function() {
393
393
$q . flush ( ) ;
394
394
395
395
expect ( $state . $current . name ) . toBe ( "contacts.item.detail" ) ;
396
- expect ( $state . params ) . toEqual ( { id : "5" } ) ;
396
+ expect ( $state . params ) . toEqual ( { id : 5 } ) ;
397
397
} ) ) ;
398
398
399
399
it ( 'should resolve states from parent uiView' , inject ( function ( $state , $stateParams , $q , $timeout ) {
0 commit comments