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

(-)a/t/db_dependent/Koha/Patrons.t (-2 / +15 lines)
Lines 19-25 Link Here
19
19
20
use Modern::Perl;
20
use Modern::Perl;
21
21
22
use Test::More tests => 25;
22
use Test::More tests => 26;
23
use Test::Warn;
23
use Test::Warn;
24
use Time::Fake;
24
use Time::Fake;
25
use DateTime;
25
use DateTime;
Lines 1121-1126 subtest 'is_child | is_adult' => sub { Link Here
1121
$retrieved_patron_1->delete;
1121
$retrieved_patron_1->delete;
1122
is( Koha::Patrons->search->count, $nb_of_patrons + 1, 'Delete should have deleted the patron' );
1122
is( Koha::Patrons->search->count, $nb_of_patrons + 1, 'Delete should have deleted the patron' );
1123
1123
1124
subtest 'Log cardnumber change' => sub {
1125
    plan tests => 1;
1126
1127
    t::lib::Mocks::mock_preference( 'BorrowersLog', 1 );
1128
    my $patron = $builder->build( { source => 'Borrower' } );
1129
1130
    $patron->{cardnumber} = 'TESTCARDNUMBER';
1131
    ModMember(%$patron);
1132
1133
    my $number_of_logs = $schema->resultset('ActionLog')->search( { module => 'MEMBERS', action => 'MODIFY', object => $patron->{borrowernumber} } )->count;
1134
    is( $number_of_logs, 2, 'With BorrowerLogs, Change in cardnumbder should be logged.' );
1135
};
1136
1137
1124
$schema->storage->txn_rollback;
1138
$schema->storage->txn_rollback;
1125
1139
1126
# TODO Move to t::lib::Mocks and reuse it!
1140
# TODO Move to t::lib::Mocks and reuse it!
1127
- 

Return to bug 18626