From 7bfbc03cb6ea2419e9df3b127a65fb180f669fd5 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 19 May 2023 08:38:20 +0000 Subject: [PATCH] Bug 33778: Fix indentation of last subtest Only whitespace. Test plan: git diff -w HEAD~1.. t/Auth_with_shibboleth.t No differences. Signed-off-by: Marcel de Rooy Signed-off-by: David Nind Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 02ec437d4768f0155463a41203977dd9c629444b) Signed-off-by: Martin Renvoize --- t/Auth_with_shibboleth.t | 88 ++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/t/Auth_with_shibboleth.t b/t/Auth_with_shibboleth.t index 235eb71e7d..7845c8cc71 100755 --- a/t/Auth_with_shibboleth.t +++ b/t/Auth_with_shibboleth.t @@ -270,57 +270,57 @@ subtest "checkpw_shib tests" => sub { }; subtest 'get_uri' => sub { -plan tests => 13; -# Tests for OPAC -t::lib::Mocks::mock_preference('OPACBaseURL', 'testopac.com' ); -is( C4::Auth_with_shibboleth::_get_uri(), - "https://testopac.com", "https opac uri returned" ); + plan tests => 13; + # Tests for OPAC + t::lib::Mocks::mock_preference('OPACBaseURL', 'testopac.com' ); + is( C4::Auth_with_shibboleth::_get_uri(), + "https://testopac.com", "https opac uri returned" ); + + $logger->clear; + + t::lib::Mocks::mock_preference('OPACBaseURL', 'http://testopac.com' ); + my $result = C4::Auth_with_shibboleth::_get_uri(); + is( $result, "https://testopac.com", "https opac uri returned" ); + $logger->warn_is("Shibboleth requires OPACBaseURL/staffClientBaseURL to use the https protocol!", "Improper protocol logged to warn") + ->clear(); -$logger->clear; + t::lib::Mocks::mock_preference('OPACBaseURL', 'https://testopac.com' ); + is( C4::Auth_with_shibboleth::_get_uri(), + "https://testopac.com", "https opac uri returned" ); -t::lib::Mocks::mock_preference('OPACBaseURL', 'http://testopac.com' ); -my $result = C4::Auth_with_shibboleth::_get_uri(); -is( $result, "https://testopac.com", "https opac uri returned" ); -$logger->warn_is("Shibboleth requires OPACBaseURL/staffClientBaseURL to use the https protocol!", "Improper protocol logged to warn") - ->clear(); + $logger->clear(); -t::lib::Mocks::mock_preference('OPACBaseURL', 'https://testopac.com' ); -is( C4::Auth_with_shibboleth::_get_uri(), - "https://testopac.com", "https opac uri returned" ); + t::lib::Mocks::mock_preference('OPACBaseURL', undef ); + $result = C4::Auth_with_shibboleth::_get_uri(); + is( $result, "https://", "https $interface uri returned" ); -$logger->clear(); + $logger->warn_is("Syspref staffClientBaseURL or OPACBaseURL not set!", "undefined OPACBaseURL - received expected warning") + ->clear(); -t::lib::Mocks::mock_preference('OPACBaseURL', undef ); -$result = C4::Auth_with_shibboleth::_get_uri(); -is( $result, "https://", "https $interface uri returned" ); + # Tests for staff client + $interface = 'intranet'; + t::lib::Mocks::mock_preference('StaffClientBaseURL', 'teststaff.com' ); + is( C4::Auth_with_shibboleth::_get_uri(), + "https://teststaff.com", "https $interface uri returned" ); -$logger->warn_is("Syspref staffClientBaseURL or OPACBaseURL not set!", "undefined OPACBaseURL - received expected warning") - ->clear(); + $logger->clear; -# Tests for staff client -$interface = 'intranet'; -t::lib::Mocks::mock_preference('StaffClientBaseURL', 'teststaff.com' ); -is( C4::Auth_with_shibboleth::_get_uri(), - "https://teststaff.com", "https $interface uri returned" ); - -$logger->clear; - -t::lib::Mocks::mock_preference('StaffClientBaseURL', 'http://teststaff.com' ); -$result = C4::Auth_with_shibboleth::_get_uri(); -is( $result, "https://teststaff.com", "https $interface uri returned" ); -$logger->warn_is("Shibboleth requires OPACBaseURL/staffClientBaseURL to use the https protocol!", 'check protocol warn') - ->clear; - -t::lib::Mocks::mock_preference('StaffClientBaseURL', 'https://teststaff.com' ); -is( C4::Auth_with_shibboleth::_get_uri(), - "https://teststaff.com", "https $interface uri returned" ); -is( $logger->count(), 0, 'No logging' ); - -t::lib::Mocks::mock_preference('StaffClientBaseURL', undef ); -$result = C4::Auth_with_shibboleth::_get_uri(); -is( $result, "https://", "https $interface uri returned" ); -$logger->warn_is("Syspref staffClientBaseURL or OPACBaseURL not set!", "undefined staffClientBaseURL - received expected warning") - ->clear; + t::lib::Mocks::mock_preference('StaffClientBaseURL', 'http://teststaff.com' ); + $result = C4::Auth_with_shibboleth::_get_uri(); + is( $result, "https://teststaff.com", "https $interface uri returned" ); + $logger->warn_is("Shibboleth requires OPACBaseURL/staffClientBaseURL to use the https protocol!", 'check protocol warn') + ->clear; + + t::lib::Mocks::mock_preference('StaffClientBaseURL', 'https://teststaff.com' ); + is( C4::Auth_with_shibboleth::_get_uri(), + "https://teststaff.com", "https $interface uri returned" ); + is( $logger->count(), 0, 'No logging' ); + + t::lib::Mocks::mock_preference('StaffClientBaseURL', undef ); + $result = C4::Auth_with_shibboleth::_get_uri(); + is( $result, "https://", "https $interface uri returned" ); + $logger->warn_is("Syspref staffClientBaseURL or OPACBaseURL not set!", "undefined staffClientBaseURL - received expected warning") + ->clear; }; $schema->storage->txn_rollback; -- 2.20.1