Bug 22006: Add tests

Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Jonathan Druart 2018-12-14 16:14:42 -03:00 committed by Nick Clemens
parent 8d2324e6de
commit 58f04600f0
1 changed files with 4 additions and 1 deletions

View File

@ -35,7 +35,7 @@ my $builder = t::lib::TestBuilder->new;
subtest 'item() tests' => sub {
plan tests => 2;
plan tests => 3;
$schema->storage->txn_begin;
@ -64,6 +64,9 @@ subtest 'item() tests' => sub {
is( ref( $account_line_item ), 'Koha::Item', 'Koha::Account::Line->item should return a Koha::Item' );
is( $line->itemnumber, $account_line_item->itemnumber, 'Koha::Account::Line->item should return the correct item' );
$line->itemnumber(undef)->store;
is( $line->item, undef, 'Koha::Account::Line->item should return undef if no item linked' );
$schema->storage->txn_rollback;
};