|
Lines 1066-1076
subtest 'notice_email_address' => sub {
Link Here
|
| 1066 |
|
1066 |
|
| 1067 |
my $patron = $builder->build_object({ class => 'Koha::Patrons' }); |
1067 |
my $patron = $builder->build_object({ class => 'Koha::Patrons' }); |
| 1068 |
|
1068 |
|
| 1069 |
t::lib::Mocks::mock_preference( 'AutoEmailPrimaryAddress', 'OFF' ); |
1069 |
t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'OFF' ); |
| 1070 |
is ($patron->notice_email_address, $patron->email, "Koha::Patron->notice_email_address returns correct value when AutoEmailPrimaryAddress is off"); |
1070 |
is ($patron->notice_email_address, $patron->email, "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is off"); |
| 1071 |
|
1071 |
|
| 1072 |
t::lib::Mocks::mock_preference( 'AutoEmailPrimaryAddress', 'emailpro' ); |
1072 |
t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'emailpro' ); |
| 1073 |
is ($patron->notice_email_address, $patron->emailpro, "Koha::Patron->notice_email_address returns correct value when AutoEmailPrimaryAddress is emailpro"); |
1073 |
is ($patron->notice_email_address, $patron->emailpro, "Koha::Patron->notice_email_address returns correct value when EmailFieldPrimary is emailpro"); |
| 1074 |
|
1074 |
|
| 1075 |
$patron->delete; |
1075 |
$patron->delete; |
| 1076 |
}; |
1076 |
}; |
|
Lines 2230-2236
subtest 'queue_notice' => sub {
Link Here
|
| 2230 |
plan tests => 11; |
2230 |
plan tests => 11; |
| 2231 |
|
2231 |
|
| 2232 |
my $dbh = C4::Context->dbh; |
2232 |
my $dbh = C4::Context->dbh; |
| 2233 |
t::lib::Mocks::mock_preference( 'AutoEmailPrimaryAddress', 'email' ); |
2233 |
t::lib::Mocks::mock_preference( 'EmailFieldPrimary', 'email' ); |
| 2234 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
2234 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
| 2235 |
my $branch = $builder->build_object( { class => 'Koha::Libraries' } ); |
2235 |
my $branch = $builder->build_object( { class => 'Koha::Libraries' } ); |
| 2236 |
my $letter_e = $builder->build_object( { |
2236 |
my $letter_e = $builder->build_object( { |
| 2237 |
- |
|
|