From 913a2108b7e2a09eb9ef03309df0f76ffe7520a2 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Fri, 1 May 2015 15:14:49 -0400 Subject: [PATCH] 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 Test remarks: Expected outcome as per test plan. No anomaly noted. --- t/Auth_with_shibboleth.t | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/t/Auth_with_shibboleth.t b/t/Auth_with_shibboleth.t index 82c95b9..1dcbf92 100644 --- a/t/Auth_with_shibboleth.t +++ b/t/Auth_with_shibboleth.t @@ -17,6 +17,7 @@ use Modern::Perl; +$| = 1; use Module::Load::Conditional qw/check_install/; use Test::More; use Test::MockModule; @@ -215,7 +216,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" ); @@ -228,6 +231,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/ ], -- 1.9.1