[Koha-patches] [PATCH] bug_11213: GetItemsInfo() test
Srdjan
srdjan at catalyst.net.nz
Mon May 11 02:08:04 CEST 2015
---
t/db_dependent/Items.t | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/t/db_dependent/Items.t b/t/db_dependent/Items.t
index b41b483..6cfb862 100755
--- a/t/db_dependent/Items.t
+++ b/t/db_dependent/Items.t
@@ -35,7 +35,7 @@ my ($branch1, $branch2) = keys %$branches;
subtest 'General Add, Get and Del tests' => sub {
- plan tests => 6;
+ plan tests => 8;
# Start transaction
$dbh->{AutoCommit} = 0;
@@ -50,6 +50,11 @@ subtest 'General Add, Get and Del tests' => sub {
cmp_ok($item_bibnum, '==', $bibnum, "New item is linked to correct biblionumber.");
cmp_ok($item_bibitemnum, '==', $bibitemnum, "New item is linked to correct biblioitemnumber.");
+ # Get items.
+ my @items_infos = GetItemsInfo( $bibnum, "cn_sort" );
+ cmp_ok(scalar(@items_infos), '==', 1, "One item for biblionumber.");
+ cmp_ok($items_infos[0]{biblionumber}, '==', $bibnum, "Item has correct biblionumber.");
+
# Get item.
my $getitem = GetItem($itemnumber);
cmp_ok($getitem->{'itemnumber'}, '==', $itemnumber, "Retrieved item has correct itemnumber.");
--
1.9.1
More information about the Koha-patches
mailing list