Bug 21325: Fix t/db_dependent/Auth.t test
authorDavid Cook <dcook@prosentient.com.au>
Thu, 24 Dec 2020 01:43:59 +0000 (01:43 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 16 Apr 2021 11:56:46 +0000 (13:56 +0200)
This patch fixes some warnings in t/db_dependent/Auth.t.

Note that it doesn't add any tests.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
t/db_dependent/Auth.t

index 2c15e57..b221797 100755 (executable)
@@ -52,6 +52,7 @@ subtest 'checkauth() tests' => sub {
         }
     );
     $cgi->mock( 'cookie', sub { return; } );
+    $cgi->mock( 'request_method', sub { return 'POST' } );
 
     my $authnotrequired = 1;
     my ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth( $cgi, $authnotrequired );
@@ -68,6 +69,7 @@ subtest 'checkauth() tests' => sub {
             elsif ( $param eq 'password' ) { return $db_user_pass; }
             else { return; }
         });
+    $cgi->mock( 'request_method', sub { return 'POST' } );
     ( $userid, $cookie, $sessionID, $flags ) = C4::Auth::checkauth( $cgi, $authnotrequired );
     is ( $userid, undef, 'If DB user is used, it should not be logged in' );