| 
      
            Lines 282-288
          subtest 'domain endpoint tests' => sub {
      
      
        Link Here
      
     | 
  
        
          | 282 | 
          };  | 
          282 | 
          };  | 
        
        
          | 283 | 
           | 
          283 | 
           | 
        
        
          | 284 | 
          subtest 'oauth login tests' => sub { | 
          284 | 
          subtest 'oauth login tests' => sub { | 
        
          
            
              | 285 | 
                  plan tests => 4;  | 
              285 | 
                  plan tests => 6;  | 
            
        
          | 286 | 
           | 
          286 | 
           | 
        
        
          | 287 | 
              $schema->storage->txn_begin;  | 
          287 | 
              $schema->storage->txn_begin;  | 
        
        
          | 288 | 
           | 
          288 | 
           | 
        
  
    | 
      
            Lines 317-322
          subtest 'oauth login tests' => sub {
      
      
        Link Here
      
     | 
  
        
          | 317 | 
              $t = Test::Mojo->new('Koha::REST::V1'); | 
          317 | 
              $t = Test::Mojo->new('Koha::REST::V1'); | 
        
        
          | 318 | 
           | 
          318 | 
           | 
        
        
          | 319 | 
              $t->get_ok("/api/v1/public/oauth/login/oauth_test/opac")->status_is(302); | 
          319 | 
              $t->get_ok("/api/v1/public/oauth/login/oauth_test/opac")->status_is(302); | 
        
            
               | 
               | 
              320 | 
               | 
            
            
              | 321 | 
                  $tx = $t->ua->build_tx( GET => "/api/v1/public/oauth/login/oauth_test/opac" );  | 
            
            
              | 322 | 
                  $tx->req->cookies( { name => 'NOTCGISESSID', value => $session_id } ); | 
            
            
              | 323 | 
                  $tx->req->env( { REMOTE_ADDR => $remote_address } ); | 
            
            
              | 324 | 
                  $t->request_ok($tx)->header_like(  | 
            
            
              | 325 | 
                      Location => qr/\?auth_error=No%20user%20session%20found/,  | 
            
            
              | 326 | 
                      "Redirect to error when no CGISESSID provided"  | 
            
            
              | 327 | 
                  );  | 
            
            
              | 328 | 
               | 
            
        
          | 320 | 
              $schema->storage->txn_rollback;  | 
          329 | 
              $schema->storage->txn_rollback;  | 
        
        
          | 321 | 
          };  | 
          330 | 
          };  | 
        
        
          | 322 | 
           | 
          331 | 
           | 
        
            
              | 323 | 
              -   | 
               | 
               |