Bug 37757: (follow-up) Adjust existing tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Tomás Cohen Arazi 2024-09-13 16:14:54 -03:00
parent ea17ce2ffa
commit 1740a293eb
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
4 changed files with 5 additions and 3 deletions

View file

@ -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

View file

@ -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',

View file

@ -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();

View file

@ -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} );