Bug 11518: (follow-up) Change method name from 'itemtype' to 'effective_itemtype' for clarity
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>
This commit is contained in:
parent
cef35259ee
commit
c3c7105fe7
2 changed files with 3 additions and 3 deletions
|
@ -625,7 +625,7 @@ __PACKAGE__->belongs_to(
|
|||
);
|
||||
|
||||
use C4::Context;
|
||||
sub itemtype {
|
||||
sub effective_itemtype {
|
||||
my ( $self ) = @_;
|
||||
|
||||
if ( C4::Context->preference('item-level_itypes') ) {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue