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

(-)a/t/db_dependent/Members.t (-3 / +20 lines)
Lines 22-33 use Test::MockModule; Link Here
22
use Test::Exception;
22
use Test::Exception;
23
23
24
use Data::Dumper qw/Dumper/;
24
use Data::Dumper qw/Dumper/;
25
25
use C4::Context;
26
use C4::Context;
26
use Koha::Database;
27
use Koha::Database;
27
use Koha::Holds;
28
use Koha::Holds;
28
use Koha::List::Patron;
29
use Koha::List::Patron;
29
use Koha::Patrons;
30
use Koha::Old::Patrons;
30
use Koha::Patron::Relationship;
31
use Koha::Patron::Relationship;
32
use Koha::Patrons;
31
33
32
use t::lib::Mocks;
34
use t::lib::Mocks;
33
use t::lib::TestBuilder;
35
use t::lib::TestBuilder;
Lines 401-407 $borrower = Koha::Patrons->find( $borrowernumber )->unblessed; Link Here
401
ok( $borrower->{userid},  'A userid should have been generated correctly' );
403
ok( $borrower->{userid},  'A userid should have been generated correctly' );
402
404
403
subtest 'purgeSelfRegistration' => sub {
405
subtest 'purgeSelfRegistration' => sub {
404
    plan tests => 5;
406
    plan tests => 8;
407
    Koha::Old::Patrons->delete;
405
408
406
    #purge unverified
409
    #purge unverified
407
    my $d=360;
410
    my $d=360;
Lines 449-456 subtest 'purgeSelfRegistration' => sub { Link Here
449
    is( C4::Members::DeleteExpiredOpacRegistrations(), 0, "DeleteExpiredOpacRegistrations doesn't delete borrower with fine and no checkout");
452
    is( C4::Members::DeleteExpiredOpacRegistrations(), 0, "DeleteExpiredOpacRegistrations doesn't delete borrower with fine and no checkout");
450
453
451
    $account_line->delete;
454
    $account_line->delete;
455
    is( C4::Members::DeleteExpiredOpacRegistrations('soft'), 1, "DeleteExpiredOpacRegistrations does delete borrower with no fines and no checkouts");
456
457
    is( Koha::Old::Patrons->count, 1, "Patron soft deleted, moved to delete patrons table" );
458
    Koha::Old::Patrons->delete;
459
460
    my $self_reg_2 = $builder->build_object({
461
        class => 'Koha::Patrons',
462
        value => {
463
            dateenrolled => '2014-01-01 01:02:03',
464
            categorycode => $c
465
        }
466
    });
467
452
    is( C4::Members::DeleteExpiredOpacRegistrations(), 1, "DeleteExpiredOpacRegistrations does delete borrower with no fines and no checkouts");
468
    is( C4::Members::DeleteExpiredOpacRegistrations(), 1, "DeleteExpiredOpacRegistrations does delete borrower with no fines and no checkouts");
453
469
470
    is( Koha::Old::Patrons->count, 0, "Patron hard deleted, not moved to delete patrons table" );
471
454
};
472
};
455
473
456
sub _find_member {
474
sub _find_member {
457
- 

Return to bug 25183