Lines 2-7
Link Here
|
2 |
|
2 |
|
3 |
use Modern::Perl; |
3 |
use Modern::Perl; |
4 |
use Test::More; |
4 |
use Test::More; |
|
|
5 |
use Test::Warn; |
5 |
use MARC::Record; |
6 |
use MARC::Record; |
6 |
|
7 |
|
7 |
use C4::Biblio qw( AddBiblio ); |
8 |
use C4::Biblio qw( AddBiblio ); |
Lines 46-51
AddReturn( $barcode );
Link Here
|
46 |
# Discharge possible without issue |
47 |
# Discharge possible without issue |
47 |
is( Koha::Borrower::Discharge::can_be_discharged({ borrowernumber => $borrowernumber }), 1, 'A patron without issues can be discharged' ); |
48 |
is( Koha::Borrower::Discharge::can_be_discharged({ borrowernumber => $borrowernumber }), 1, 'A patron without issues can be discharged' ); |
48 |
|
49 |
|
|
|
50 |
is(Koha::Borrower::Discharge::generate_as_pdf,undef,"Confirm failure when lacking borrower number"); |
51 |
|
52 |
# Check if PDF::FromHTML is installed. |
53 |
my $check = eval { require PDF::FromHTML; }; |
54 |
|
55 |
# Tests for if PDF::FromHTML is installed |
56 |
if ($check) { |
57 |
isnt( Koha::Borrower::Discharge::generate_as_pdf({ borrowernumber => $borrowernumber }), undef, "Temporary PDF generated." ); |
58 |
} |
59 |
# Tests for if PDF::FromHTML is not installed |
60 |
else { |
61 |
warning_like { Koha::Borrower::Discharge::generate_as_pdf({ borrowernumber => $borrowernumber, testing => 1 }) } |
62 |
[ qr/Can't locate PDF\/FromHTML.pm in \@INC/ ], |
63 |
"Expected failure because of missing PDF::FromHTML."; |
64 |
} |
65 |
|
49 |
# FIXME |
66 |
# FIXME |
50 |
# At this point, there is a problem with the AutoCommit off |
67 |
# At this point, there is a problem with the AutoCommit off |
51 |
# The transaction is bloked into DBIx::Class::Storage::DBI::_dbh_execute |
68 |
# The transaction is bloked into DBIx::Class::Storage::DBI::_dbh_execute |
52 |
- |
|
|