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> (cherry picked from commit7adb8861aa) Signed-off-by: Frédéric Demians <f.demians@tamil.fr> (cherry picked from commit043c8f105b) Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
parent
ddab9d2556
commit
5ab0a8c23c
|
|
@ -19,7 +19,7 @@ use Modern::Perl;
|
|||
|
||||
use POSIX qw(strftime);
|
||||
|
||||
use Test::More tests => 87;
|
||||
use Test::More tests => 88;
|
||||
use Koha::Database;
|
||||
|
||||
BEGIN {
|
||||
|
|
@ -921,4 +921,11 @@ 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');
|
||||
};
|
||||
|
||||
$schema->storage->txn_rollback();
|
||||
|
|
|
|||
Loading…
Reference in New Issue