View | Details | Raw Unified | Return to bug 22823
Collapse All | Expand All

(-)a/Koha/Library.pm (-1 / +2 lines)
Lines 80-86 sub inbound_email_address { Link Here
80
         $self->branchreplyto
80
         $self->branchreplyto
81
      || $self->branchemail
81
      || $self->branchemail
82
      || C4::Context->preference('ReplytoDefault')
82
      || C4::Context->preference('ReplytoDefault')
83
      || C4::Context->preference('KohaAdminEmailAddress');
83
      || C4::Context->preference('KohaAdminEmailAddress')
84
      || undef;
84
}
85
}
85
86
86
=head3 library_groups
87
=head3 library_groups
(-)a/t/db_dependent/Koha/Libraries.t (-4 / +6 lines)
Lines 454-460 subtest '->get_effective_marcorgcode' => sub { Link Here
454
454
455
subtest '->inbound_email_address' => sub {
455
subtest '->inbound_email_address' => sub {
456
456
457
    plan tests => 4;
457
    plan tests => 5;
458
458
459
    $schema->storage->txn_begin;
459
    $schema->storage->txn_begin;
460
460
Lines 482-491 subtest '->inbound_email_address' => sub { Link Here
482
    is( $library_1->inbound_email_address, 'reply@mylibrary.com',
482
    is( $library_1->inbound_email_address, 'reply@mylibrary.com',
483
       'Fallback to ReplytoDefault email address when branchreplyto and branchemail are undefined');
483
       'Fallback to ReplytoDefault email address when branchreplyto and branchemail are undefined');
484
484
485
    t::lib::Mocks::mock_preference( 'ReplytoDefault', undef );
485
    t::lib::Mocks::mock_preference( 'ReplytoDefault', '' );
486
    is( $library_1->inbound_email_address, 'admin@mylibrary.com',
486
    is( $library_1->inbound_email_address, 'admin@mylibrary.com',
487
       'Fallback to KohaAdminEmailAddress email address when branchreplyto, branchemail and eplytoDefault are undefined');
487
       'Fallback to KohaAdminEmailAddress email address when branchreplyto, branchemail and ReplytoDefault are undefined');
488
488
489
    t::lib::Mocks::mock_preference( 'KohaAdminEmailAddress', '' );
490
    is( $library_1->inbound_email_address, undef,
491
       'Return undef when  email address when branchreplyto, branchemail, ReplytoDefault and KohaAdminEmailAddress are undefined');
489
    $schema->storage->txn_rollback;
492
    $schema->storage->txn_rollback;
490
};
493
};
491
494
492
- 

Return to bug 22823