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

(-)a/t/db_dependent/Koha/Patron.t (-5 / +5 lines)
Lines 1789-1805 subtest 'notify_library_of_registration()' => sub { Link Here
1789
    $schema->storage->txn_rollback;
1789
    $schema->storage->txn_rollback;
1790
};
1790
};
1791
1791
1792
subtest 'notice_email_address' => sub {
1792
subtest 'notice_email_address() tests' => sub {
1793
1793
    plan tests => 3;
1794
    plan tests => 3;
1795
1794
    $schema->storage->txn_begin;
1796
    $schema->storage->txn_begin;
1795
1797
1796
    my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
1798
    my $patron = $builder->build_object( { class => 'Koha::Patrons' } );
1797
1799
1798
    t::lib::Mocks::mock_preference( 'EmailFieldPrecedence', 'email|emailpro' );
1800
    t::lib::Mocks::mock_preference( 'EmailFieldPrecedence', 'email|emailpro' );
1799
    t::lib::Mocks::mock_preference( 'EmailFieldPrimary',    'OFF' );
1801
    t::lib::Mocks::mock_preference( 'EmailFieldPrimary',    undef );
1800
    is(
1802
    is(
1801
        $patron->notice_email_address, $patron->email,
1803
        $patron->notice_email_address, $patron->email,
1802
        "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is off"
1804
        "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is not defined"
1803
    );
1805
    );
1804
1806
1805
    t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'emailpro' );
1807
    t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'emailpro' );
Lines 1815-1821 subtest 'notice_email_address' => sub { Link Here
1815
        "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is 'MULTI' and EmailFieldSelection is 'email,emailpro'"
1817
        "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is 'MULTI' and EmailFieldSelection is 'email,emailpro'"
1816
    );
1818
    );
1817
1819
1818
    $patron->delete;
1819
    $schema->storage->txn_rollback;
1820
    $schema->storage->txn_rollback;
1820
};
1821
};
1821
1822
1822
- 

Return to bug 37757