|
Lines 26-36
use Test::MockModule;
Link Here
|
| 26 |
use Time::Fake; |
26 |
use Time::Fake; |
| 27 |
use DateTime; |
27 |
use DateTime; |
| 28 |
use JSON; |
28 |
use JSON; |
|
|
29 |
use Data::Dumper; |
| 29 |
|
30 |
|
| 30 |
use C4::Circulation; |
31 |
use C4::Circulation; |
| 31 |
use C4::Biblio; |
32 |
use C4::Biblio; |
| 32 |
use C4::Auth qw(checkpw_hash); |
33 |
use C4::Auth qw(checkpw_hash); |
| 33 |
|
34 |
|
|
|
35 |
use Koha::ActionLogs; |
| 34 |
use Koha::Holds; |
36 |
use Koha::Holds; |
| 35 |
use Koha::Old::Holds; |
37 |
use Koha::Old::Holds; |
| 36 |
use Koha::Patrons; |
38 |
use Koha::Patrons; |
|
Lines 1587-1593
subtest 'Test Koha::Patrons::merge' => sub {
Link Here
|
| 1587 |
}; |
1589 |
}; |
| 1588 |
|
1590 |
|
| 1589 |
subtest '->store' => sub { |
1591 |
subtest '->store' => sub { |
| 1590 |
plan tests => 5; |
1592 |
plan tests => 6; |
| 1591 |
my $schema = Koha::Database->new->schema; |
1593 |
my $schema = Koha::Database->new->schema; |
| 1592 |
$schema->storage->txn_begin; |
1594 |
$schema->storage->txn_begin; |
| 1593 |
|
1595 |
|
|
Lines 1624-1629
subtest '->store' => sub {
Link Here
|
| 1624 |
|
1626 |
|
| 1625 |
$schema->storage->dbh->{PrintError} = $print_error; |
1627 |
$schema->storage->dbh->{PrintError} = $print_error; |
| 1626 |
$schema->storage->txn_rollback; |
1628 |
$schema->storage->txn_rollback; |
|
|
1629 |
|
| 1630 |
subtest 'skip updated_on for BorrowersLog' => sub { |
| 1631 |
plan tests => 1; |
| 1632 |
$schema->storage->txn_begin; |
| 1633 |
t::lib::Mocks::mock_preference('BorrowersLog', 1); |
| 1634 |
my $patron = $builder->build_object({ class => 'Koha::Patrons' }); |
| 1635 |
$patron->updated_on(dt_from_string($patron->updated_on)->add( seconds => 1 ))->store; |
| 1636 |
my $logs = Koha::ActionLogs->search({ module =>'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber }); |
| 1637 |
is($logs->count, 0, '->store should not have generated a log for updated_on') or diag 'Log generated:'.Dumper($logs->unblessed); |
| 1638 |
$schema->storage->txn_rollback; |
| 1639 |
}; |
| 1627 |
}; |
1640 |
}; |
| 1628 |
|
1641 |
|
| 1629 |
subtest '->set_password' => sub { |
1642 |
subtest '->set_password' => sub { |
| 1630 |
- |
|
|