Bug 15629: Fix tests - Koha::Library does not have ->categories but ->get_categories
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 2 Feb 2016 13:58:16 +0000 (13:58 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 24 Feb 2016 03:55:07 +0000 (03:55 +0000)
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
t/db_dependent/Branch.t

index e10abd3..3d5243c 100644 (file)
@@ -192,10 +192,10 @@ $b2_stored->add_to_categories([$CAT1]);
 is( Koha::Libraries->search->count, $count + 2, 'BRB added' );
 
 my $b1info = Koha::Libraries->find( $b1->{branchcode} );
-is_deeply( $b1info->categories->count, 0, 'BRA has no categories' );
+is_deeply( $b1info->get_categories->count, 0, 'BRA has no categories' );
 
 my $b2info = Koha::Libraries->find( $b2->{branchcode} );
-is_deeply( $b2->categories->count, 1, 'BRB has the category CAT1' );
+is_deeply( $b2info->get_categories->count, 1, 'BRB has the category CAT1' );
 
 Koha::LibraryCategory->new($cat2)->store;
 is( Koha::LibraryCategories->search->count, $count_cat + 3, "Two categories added" );