File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -383,4 +383,25 @@ describe('state', function () {
383
383
} ) ) ;
384
384
} ) ;
385
385
386
- } ) ;
386
+ describe ( 'html5Mode compatibility' , function ( ) {
387
+
388
+ it ( 'should generate non-hashbang URLs in HTML5 mode' , inject ( function ( $state ) {
389
+ expect ( $state . href ( "about.person" , { person : "bob" } ) ) . toEqual ( "#/about/bob" ) ;
390
+ locationProvider . html5Mode ( true ) ;
391
+ expect ( $state . href ( "about.person" , { person : "bob" } ) ) . toEqual ( "/about/bob" ) ;
392
+ } ) ) ;
393
+ } ) ;
394
+
395
+ describe ( 'default properties' , function ( ) {
396
+ it ( 'should always have a name' , inject ( function ( $state , $q ) {
397
+ $state . transitionTo ( A ) ;
398
+ $q . flush ( ) ;
399
+ expect ( $state . $current . name ) . toBe ( 'A' ) ;
400
+ expect ( $state . $current . toString ( ) ) . toBe ( 'A' ) ;
401
+ } ) ) ;
402
+
403
+ it ( 'should always have a resolve object' , inject ( function ( $state ) {
404
+ expect ( $state . $current . resolve ) . toEqual ( { } ) ;
405
+ } ) ) ;
406
+ } ) ;
407
+ } ) ;
You can’t perform that action at this time.
0 commit comments