| Lines 17-23
          
      
      
        Link Here | 
        
          | 17 |  | 17 |  | 
        
          | 18 | use Modern::Perl; | 18 | use Modern::Perl; | 
        
          | 19 |  | 19 |  | 
          
            
              | 20 | use Test::More tests => 5; | 20 | use Test::More tests => 6; | 
        
          | 21 | use Test::Mojo; | 21 | use Test::Mojo; | 
        
          | 22 |  | 22 |  | 
        
          | 23 | use Module::Load::Conditional qw(can_load); | 23 | use Module::Load::Conditional qw(can_load); | 
  
    | Lines 296-301
          subtest 'x-koha-override stash tests' => sub {
      
      
        Link Here | 
        
          | 296 |     $schema->storage->txn_rollback; | 296 |     $schema->storage->txn_rollback; | 
        
          | 297 | }; | 297 | }; | 
        
          | 298 |  | 298 |  | 
            
              |  |  | 299 | subtest 'public routes have "is_public" info stashed' => sub { | 
            
              | 300 |  | 
            
              | 301 |     plan tests => 2; | 
            
              | 302 |  | 
            
              | 303 |     $schema->storage->txn_begin; | 
            
              | 304 |  | 
            
              | 305 |     my $stash; | 
            
              | 306 |     $t->app->hook( | 
            
              | 307 |         after_dispatch => sub { | 
            
              | 308 |             $stash = shift->stash; | 
            
              | 309 |         } | 
            
              | 310 |     ); | 
            
              | 311 |  | 
            
              | 312 |     $t->get_ok('/api/v1/public/biblios/1'); | 
            
              | 313 |  | 
            
              | 314 |     my $is_public = $stash->{is_public}; | 
            
              | 315 |  | 
            
              | 316 |     ok( $is_public, 'Correctly stashed the fact it is a public route' ); | 
            
              | 317 |  | 
            
              | 318 |     $schema->storage->txn_rollback; | 
            
              | 319 | }; | 
            
              | 320 |  | 
        
          | 299 | sub create_user_and_session { | 321 | sub create_user_and_session { | 
        
          | 300 |  | 322 |  | 
        
          | 301 |     my $args  = shift; | 323 |     my $args  = shift; | 
            
              | 302 | -  |  |  |