Bug 11518: (follow-up) Change method name from 'itemtype' to 'effective_itemtype...
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 10 Jan 2014 15:21:55 +0000 (10:21 -0500)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 29 Apr 2014 15:05:24 +0000 (15:05 +0000)
Test runs without errors.

Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Koha/Schema/Result/Item.pm
t/db_dependent/Items.t

index 656de69..6a1e0d2 100644 (file)
@@ -625,7 +625,7 @@ __PACKAGE__->belongs_to(
 );
 
 use C4::Context;
-sub itemtype {
+sub effective_itemtype {
     my ( $self ) = @_;
 
     if ( C4::Context->preference('item-level_itypes') ) {
index a4bdd1c..af7b252 100755 (executable)
@@ -170,10 +170,10 @@ subtest q{Test Koha::Database->schema()->resultset('Item')->itemtype()} => sub {
     my ( $item ) = $biblioitem->items();
 
     C4::Context->set_preference( 'item-level_itypes', 0 );
-    ok( $item->itemtype() eq 'BIB_LEVEL', '$item->itemtype() returns biblioitem.itemtype when item-level_itypes is disabled' );
+    ok( $item->effective_itemtype() eq 'BIB_LEVEL', '$item->itemtype() returns biblioitem.itemtype when item-level_itypes is disabled' );
 
     C4::Context->set_preference( 'item-level_itypes', 1 );
-    ok( $item->itemtype() eq 'ITEM_LEVEL', '$item->itemtype() returns items.itype when item-level_itypes is disabled' );
+    ok( $item->effective_itemtype() eq 'ITEM_LEVEL', '$item->itemtype() returns items.itype when item-level_itypes is disabled' );
 
 
     $dbh->rollback;