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

(-)a/t/db_dependent/Members.t (-3 / +13 lines)
Lines 17-27 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 77;
20
use Test::More tests => 79;
21
use Test::MockModule;
21
use Test::MockModule;
22
use Data::Dumper;
22
use Data::Dumper;
23
use C4::Context;
23
use C4::Context;
24
use Koha::Database;
24
use Koha::Database;
25
use Koha::Holds;
25
use Koha::List::Patron;
26
use Koha::List::Patron;
26
27
27
28
Lines 167-176 ModMember(borrowernumber => $member->{'borrowernumber'}, dateexpiry => '2001-01- Link Here
167
$member = GetMemberDetails($member->{'borrowernumber'});
168
$member = GetMemberDetails($member->{'borrowernumber'});
168
ok($member->{is_expired}, "GetMemberDetails() indicates that patron is expired");
169
ok($member->{is_expired}, "GetMemberDetails() indicates that patron is expired");
169
170
170
# clean up 
171
# Create a reserve for the patron
172
$builder->build({
173
    source => 'Reserve',
174
    value  => {
175
        borrowernumber => $member->{ borrowernumber }
176
    }
177
});
178
is( Koha::Holds->search({ borrowernumber => $member->{borrowernumber} })->count,
179
    1, 'Hold created correctly' );
171
DelMember($member->{borrowernumber});
180
DelMember($member->{borrowernumber});
172
my $borrower = GetMember( cardnumber => $CARDNUMBER );
181
my $borrower = GetMember( cardnumber => $CARDNUMBER );
173
is( $borrower, undef, 'DelMember should remove the patron' );
182
is( $borrower, undef, 'DelMember should remove the patron' );
183
is( Koha::Holds->search({ borrowernumber => $member->{borrowernumber} })->count,
184
    0, 'Hold deleted correctly' );
174
185
175
# Check_Userid tests
186
# Check_Userid tests
176
%data = (
187
%data = (
177
- 

Return to bug 16819