Lines 1608-1614
$retrieved_patron_1->delete;
Link Here
|
1608 |
is( Koha::Patrons->search->count, $nb_of_patrons - 1, 'Delete should have deleted the patron' ); |
1608 |
is( Koha::Patrons->search->count, $nb_of_patrons - 1, 'Delete should have deleted the patron' ); |
1609 |
|
1609 |
|
1610 |
subtest 'BorrowersLog tests' => sub { |
1610 |
subtest 'BorrowersLog tests' => sub { |
1611 |
plan tests => 4; |
1611 |
plan tests => 5; |
1612 |
|
1612 |
|
1613 |
t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); |
1613 |
t::lib::Mocks::mock_preference( 'BorrowersLog', 1 ); |
1614 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
1614 |
my $patron = $builder->build_object( { class => 'Koha::Patrons' } ); |
Lines 1627-1632
subtest 'BorrowersLog tests' => sub {
Link Here
|
1627 |
$patron->update_lastseen('connection'); |
1627 |
$patron->update_lastseen('connection'); |
1628 |
@logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } ); |
1628 |
@logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } ); |
1629 |
is( scalar @logs, 1, 'With BorrowerLogs and TrackLastPatronActivityTriggers we should not spam the logs'); |
1629 |
is( scalar @logs, 1, 'With BorrowerLogs and TrackLastPatronActivityTriggers we should not spam the logs'); |
|
|
1630 |
|
1631 |
Koha::ActionLogs->search()->delete(); |
1632 |
$patron->get_from_storage(); |
1633 |
$patron->set( { debarred => "" }); |
1634 |
$patron->store; |
1635 |
my $log = Koha::ActionLogs->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->borrowernumber } )->next; |
1636 |
isnt( defined $log, "No action log generated where incoming changed column is empty string and value in storage is NULL" ); |
1630 |
}; |
1637 |
}; |
1631 |
$schema->storage->txn_rollback; |
1638 |
$schema->storage->txn_rollback; |
1632 |
|
1639 |
|
1633 |
- |
|
|