Lines 20-26
use Modern::Perl;
Link Here
|
20 |
use POSIX qw(strftime); |
20 |
use POSIX qw(strftime); |
21 |
|
21 |
|
22 |
use Test::More tests => 87; |
22 |
use Test::More tests => 87; |
23 |
use Koha::Database; |
23 |
use t::lib::Database; |
24 |
|
24 |
|
25 |
BEGIN { |
25 |
BEGIN { |
26 |
use_ok('C4::Acquisition'); |
26 |
use_ok('C4::Acquisition'); |
Lines 118-128
sub _check_fields_of_orders {
Link Here
|
118 |
} |
118 |
} |
119 |
|
119 |
|
120 |
|
120 |
|
121 |
my $schema = Koha::Database->new()->schema(); |
121 |
my $dbh = t::lib::Database::dbh; |
122 |
$schema->storage->txn_begin(); |
|
|
123 |
|
124 |
my $dbh = C4::Context->dbh; |
125 |
$dbh->{RaiseError} = 1; |
126 |
|
122 |
|
127 |
# Creating some orders |
123 |
# Creating some orders |
128 |
my $booksellerid = C4::Bookseller::AddBookseller( |
124 |
my $booksellerid = C4::Bookseller::AddBookseller( |
Lines 920-924
ok((defined $order4->{datecancellationprinted}), "order is cancelled");
Link Here
|
920 |
ok(($order4->{cancellationreason} eq "foobar"), "order has cancellation reason \"foobar\""); |
916 |
ok(($order4->{cancellationreason} eq "foobar"), "order has cancellation reason \"foobar\""); |
921 |
ok((not defined GetBiblio($order4->{biblionumber})), "biblio does not exist anymore"); |
917 |
ok((not defined GetBiblio($order4->{biblionumber})), "biblio does not exist anymore"); |
922 |
# End of tests for DelOrder |
918 |
# End of tests for DelOrder |
923 |
|
|
|
924 |
$schema->storage->txn_rollback(); |