From 1740a293eb708a942df3be6cddb7e15d4bd33b91 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 13 Sep 2024 16:14:54 -0300 Subject: [PATCH] Bug 37757: (follow-up) Adjust existing tests Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Auth_with_shibboleth.t | 2 +- t/db_dependent/Letters.t | 2 +- t/db_dependent/Letters/TemplateToolkit.t | 2 ++ t/db_dependent/Message.t | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/t/db_dependent/Auth_with_shibboleth.t b/t/db_dependent/Auth_with_shibboleth.t index c42dd9d602..440eef2a1f 100755 --- a/t/db_dependent/Auth_with_shibboleth.t +++ b/t/db_dependent/Auth_with_shibboleth.t @@ -46,7 +46,7 @@ my $interface = 'opac'; # Mock few preferences t::lib::Mocks::mock_preference('OPACBaseURL', 'testopac.com' ); t::lib::Mocks::mock_preference('StaffClientBaseURL', 'teststaff.com' ); -t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); +t::lib::Mocks::mock_preference( 'EmailFieldPrimary', '' ); t::lib::Mocks::mock_preference( 'EmailFieldPrecedence', 'emailpro' ); # Mock Context: config, tz and interface diff --git a/t/db_dependent/Letters.t b/t/db_dependent/Letters.t index d607fa7d04..fbe496d7ac 100755 --- a/t/db_dependent/Letters.t +++ b/t/db_dependent/Letters.t @@ -74,7 +74,7 @@ my $dbh = C4::Context->dbh; $dbh->do(q|DELETE FROM letter|); $dbh->do(q|DELETE FROM message_queue|); $dbh->do(q|DELETE FROM message_transport_types|); -t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); +t::lib::Mocks::mock_preference( 'EmailFieldPrimary', '' ); my $library = $builder->build({ source => 'Branch', diff --git a/t/db_dependent/Letters/TemplateToolkit.t b/t/db_dependent/Letters/TemplateToolkit.t index 1c6fea8ee0..1ac70733b1 100755 --- a/t/db_dependent/Letters/TemplateToolkit.t +++ b/t/db_dependent/Letters/TemplateToolkit.t @@ -49,6 +49,8 @@ use Koha::Notice::Messages; use Koha::Notice::Templates; use Koha::Patron::Modification; +t::lib::Mocks::mock_preference( 'EmailFieldPrimary', '' ); + my $schema = Koha::Database->schema; $schema->storage->txn_begin(); diff --git a/t/db_dependent/Message.t b/t/db_dependent/Message.t index 95673c36c9..c100dd5450 100755 --- a/t/db_dependent/Message.t +++ b/t/db_dependent/Message.t @@ -50,7 +50,7 @@ my $letter = C4::Letters::GetPreparedLetter( ); -t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); +t::lib::Mocks::mock_preference( 'EmailFieldPrimary', '' ); C4::Message->enqueue($letter, $patron, 'email'); my $message = C4::Message->find_last_message($patron->unblessed, 'TEST_MESSAGE', 'email'); like( $message->{metadata}, qr{heÄllo} ); -- 2.39.5