Bug 14111: Silence warnings in t/Auth_with_shibboleth.t

Poorly capturing warnings_exist test cases generated noise.
This patch fixes that.

TEST PLAN
---------
1) $ prove t/Auth_with_shibboleth.t
   -- There are messages about lines 132 and 133. Noise.
2) Apply patch
3) $ prove t/Auth_with_shibboleth.t
   -- No messages. YAY!
4) koha qa test tools

Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com>

Test remarks: Expected outcome as per test plan. No anomaly noted.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Mark Tompsett 2015-05-01 15:14:49 -04:00 committed by Tomas Cohen Arazi
parent cfacda2bb4
commit 85a057bc5e
1 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,7 @@
use Modern::Perl;
$| = 1;
use Module::Load::Conditional qw/check_install/;
use Test::More;
use Test::MockModule;
@ -216,7 +217,9 @@ subtest "checkpw_shib tests" => sub {
warnings_exist {
( $retval, $retcard, $retuserid ) = checkpw_shib( $shib_login );
}
[ qr/checkpw_shib/, qr/User Shibboleth-authenticated as:/ ],
[ qr/checkpw_shib/, qr/koha borrower field to match: userid/,
qr/shibboleth attribute to match: uid/,
qr/User Shibboleth-authenticated as:/ ],
"good user with debug enabled";
is( $retval, "1", "user authenticated" );
is( $retcard, "testcardnumber", "expected cardnumber returned" );
@ -229,6 +232,8 @@ subtest "checkpw_shib tests" => sub {
}
[
qr/checkpw_shib/,
qr/koha borrower field to match: userid/,
qr/shibboleth attribute to match: uid/,
qr/User Shibboleth-authenticated as:/,
qr/not a valid Koha user/
],