From 58de5c3a27ec4a608e6e9c258cfef926542fc7ee Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 17 Jul 2020 15:18:09 +0000 Subject: [PATCH] Bug 21946: Add test for parent method Signed-off-by: Alex Arnaud --- t/db_dependent/Koha/ItemTypes.t | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/t/db_dependent/Koha/ItemTypes.t b/t/db_dependent/Koha/ItemTypes.t index cbb16f953d..7f5e9e8188 100755 --- a/t/db_dependent/Koha/ItemTypes.t +++ b/t/db_dependent/Koha/ItemTypes.t @@ -20,7 +20,7 @@ use Modern::Perl; use Data::Dumper; -use Test::More tests => 13; +use Test::More tests => 14; use t::lib::Mocks; use t::lib::TestBuilder; @@ -95,6 +95,7 @@ Koha::Localization->new( my $type = Koha::ItemTypes->find($child1->itemtype); ok( defined($type), 'first result' ); is_deeply( $type->unblessed, $child1->unblessed, "We got back the same object" ); +is_deeply( $type->parent->unblessed, $parent1->unblessed, 'The parent method returns the correct object'); $type = Koha::ItemTypes->find($child2->itemtype); ok( defined($type), 'second result' ); -- 2.20.1