Lines 90-101
Koha::Patron::Discharge::discharge( { borrowernumber => $patron->{borrowernumber
Link Here
|
90 |
Koha::Patron::Discharge::discharge( { borrowernumber => $patron2->{borrowernumber} } ); |
90 |
Koha::Patron::Discharge::discharge( { borrowernumber => $patron2->{borrowernumber} } ); |
91 |
Koha::Patron::Discharge::discharge( { borrowernumber => $patron3->{borrowernumber} } ); |
91 |
Koha::Patron::Discharge::discharge( { borrowernumber => $patron3->{borrowernumber} } ); |
92 |
is( Koha::Patron::Discharge::is_discharged( { borrowernumber => $patron->{borrowernumber} } ), 1, 'The patron has been discharged' ); |
92 |
is( Koha::Patron::Discharge::is_discharged( { borrowernumber => $patron->{borrowernumber} } ), 1, 'The patron has been discharged' ); |
93 |
is( Koha::Patron::Debarments::IsDebarred( $patron->{borrowernumber} ), '9999-12-31', 'The patron has been debarred after discharge' ); |
93 |
is( Koha::Patrons->find( $patron->{borrowernumber} )->is_debarred, '9999-12-31', 'The patron has been debarred after discharge' ); |
94 |
is( scalar( @{ Koha::Patron::Discharge::get_validated() } ), 3, 'There are 3 validated discharges' ); |
94 |
is( scalar( @{ Koha::Patron::Discharge::get_validated() } ), 3, 'There are 3 validated discharges' ); |
95 |
is( scalar( @{ Koha::Patron::Discharge::get_validated( { borrowernumber => $patron->{borrowernumber} } ) } ), 1, 'There is 1 validated discharge for a given patron' ); |
95 |
is( scalar( @{ Koha::Patron::Discharge::get_validated( { borrowernumber => $patron->{borrowernumber} } ) } ), 1, 'There is 1 validated discharge for a given patron' ); |
96 |
is( scalar( @{ Koha::Patron::Discharge::get_validated( { branchcode => $library->{branchcode} } ) } ), 2, 'There is 2 validated discharges for a given branchcode' ); # This is not used in the code yet |
96 |
is( scalar( @{ Koha::Patron::Discharge::get_validated( { branchcode => $library->{branchcode} } ) } ), 2, 'There is 2 validated discharges for a given branchcode' ); # This is not used in the code yet |
97 |
Koha::Patron::Debarments::DelUniqueDebarment( { 'borrowernumber' => $patron->{borrowernumber}, 'type' => 'DISCHARGE' } ); |
97 |
Koha::Patron::Debarments::DelUniqueDebarment( { 'borrowernumber' => $patron->{borrowernumber}, 'type' => 'DISCHARGE' } ); |
98 |
ok( !Koha::Patron::Debarments::IsDebarred( $patron->{borrowernumber} ), 'The debarment has been lifted' ); |
98 |
ok( !Koha::Patrons->find( $patron->{borrowernumber} )->is_debarred, 'The debarment has been lifted' ); |
99 |
ok( !Koha::Patron::Discharge::is_discharged( { borrowernumber => $patron->{borrowernumber} } ), 'The patron is not discharged after the restriction has been lifted' ); |
99 |
ok( !Koha::Patron::Discharge::is_discharged( { borrowernumber => $patron->{borrowernumber} } ), 'The patron is not discharged after the restriction has been lifted' ); |
100 |
|
100 |
|
101 |
# Verify that the discharge works multiple times |
101 |
# Verify that the discharge works multiple times |
102 |
- |
|
|