@@ -38,7 +38,8 @@ describe('state', function () {
38
38
. state ( 'home.item' , { url : "front/:id" } )
39
39
. state ( 'about' , { url : "/about" } )
40
40
. state ( 'about.person' , { url : "/:person" } )
41
- . state ( 'about.person.item' , { url : "/:id" } ) ;
41
+ . state ( 'about.person.item' , { url : "/:id" } )
42
+ . state ( 'about.sidebar' , { } ) ;
42
43
43
44
$provide . value ( 'AppInjectable' , AppInjectable ) ;
44
45
} ) ) ;
@@ -160,7 +161,7 @@ describe('state', function () {
160
161
'$stateChangeSuccess(C,A);' ) ;
161
162
} ) ) ;
162
163
163
- it ( 'aborts pending transitions even when going back to the curren state' , inject ( function ( $state , $q ) {
164
+ it ( 'aborts pending transitions even when going back to the current state' , inject ( function ( $state , $q ) {
164
165
initStateTo ( A ) ;
165
166
logEvents = true ;
166
167
@@ -191,6 +192,11 @@ describe('state', function () {
191
192
'D.onExit;' +
192
193
'A.onEnter;' ) ;
193
194
} ) ) ;
195
+
196
+ it ( 'doesn\'t transition to parent state when child has no URL' , inject ( function ( $state , $q ) {
197
+ $state . transitionTo ( 'about.sidebar' ) ; $q . flush ( ) ;
198
+ expect ( $state . current . name ) . toEqual ( 'about.sidebar' ) ;
199
+ } ) ) ;
194
200
} ) ;
195
201
196
202
0 commit comments