|
Lines 472-487
C4::Context->dbh->do("DELETE FROM accountlines");
Link Here
|
| 472 |
); |
472 |
); |
| 473 |
t::lib::Mocks::mock_preference('RenewalLog', 0); |
473 |
t::lib::Mocks::mock_preference('RenewalLog', 0); |
| 474 |
my $date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } ); |
474 |
my $date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } ); |
| 475 |
my $old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEW"]) } ); |
475 |
my $old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); |
| 476 |
AddRenewal( $renewing_borrower->{borrowernumber}, $itemnumber7, $branch ); |
476 |
AddRenewal( $renewing_borrower->{borrowernumber}, $itemnumber7, $branch ); |
| 477 |
my $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEW"]) } ); |
477 |
my $new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); |
| 478 |
is ($new_log_size, $old_log_size, 'renew log not added because of the syspref RenewalLog'); |
478 |
is ($new_log_size, $old_log_size, 'renew log not added because of the syspref RenewalLog'); |
| 479 |
|
479 |
|
| 480 |
t::lib::Mocks::mock_preference('RenewalLog', 1); |
480 |
t::lib::Mocks::mock_preference('RenewalLog', 1); |
| 481 |
$date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } ); |
481 |
$date = output_pref( { dt => dt_from_string(), datenonly => 1, dateformat => 'iso' } ); |
| 482 |
$old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEW"]) } ); |
482 |
$old_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); |
| 483 |
AddRenewal( $renewing_borrower->{borrowernumber}, $itemnumber7, $branch ); |
483 |
AddRenewal( $renewing_borrower->{borrowernumber}, $itemnumber7, $branch ); |
| 484 |
$new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEW"]) } ); |
484 |
$new_log_size = scalar(@{GetLogs( $date, $date, undef,["CIRCULATION"], ["RENEWAL"]) } ); |
| 485 |
is ($new_log_size, $old_log_size + 1, 'renew log successfully added'); |
485 |
is ($new_log_size, $old_log_size + 1, 'renew log successfully added'); |
| 486 |
|
486 |
|
| 487 |
|
487 |
|
| 488 |
- |
|
|