Bug 16934: Add test for ModOrder

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2016-07-21 18:23:00 +01:00 committed by Kyle M Hall
parent 7cc6f6eb45
commit 7adb8861aa

View file

@ -19,7 +19,7 @@ use Modern::Perl;
use POSIX qw(strftime);
use Test::More tests => 91;
use Test::More tests => 92;
use Koha::Database;
BEGIN {
@ -938,6 +938,13 @@ ok(($order4->{cancellationreason} eq "foobar"), "order has cancellation reason \
ok((not defined GetBiblio($order4->{biblionumber})), "biblio does not exist anymore");
# End of tests for DelOrder
subtest 'ModOrder' => sub {
plan tests => 1;
ModOrder( { ordernumber => $order1->{ordernumber}, unitprice => 42 } );
my $order = GetOrder( $order1->{ordernumber} );
is( int($order->{unitprice}), 42, 'ModOrder should work even if biblionumber if not passed');
};
# Budget reports
my $all_count = scalar GetBudgetsReport();
ok($all_count >= 1, "GetBudgetReport OK");