Lines 77-83
$retrieved_library_1->update_categories( [ $new_category_2, $new_category_3 ] );
Link Here
|
77 |
is( Koha::Libraries->find( $new_library_1->branchcode )->get_categories->count, 2, '2 libraries should have been linked to the category 2' ); |
77 |
is( Koha::Libraries->find( $new_library_1->branchcode )->get_categories->count, 2, '2 libraries should have been linked to the category 2' ); |
78 |
|
78 |
|
79 |
my $retrieved_category_2 = Koha::LibraryCategories->find( $new_category_2->categorycode ); |
79 |
my $retrieved_category_2 = Koha::LibraryCategories->find( $new_category_2->categorycode ); |
80 |
is( $retrieved_category_2->branchcodes->count, 2, '2 libraries should have been linked to the category_2' ); |
80 |
is( $retrieved_category_2->libraries->count, 2, '2 libraries should have been linked to the category_2' ); |
81 |
is( $retrieved_category_2->categorycode, uc('my_cc_2'), 'The Koha::LibraryCategory constructor should have upercased the categorycode' ); |
81 |
is( $retrieved_category_2->categorycode, uc('my_cc_2'), 'The Koha::LibraryCategory constructor should have upercased the categorycode' ); |
82 |
|
82 |
|
83 |
$retrieved_library_1->delete; |
83 |
$retrieved_library_1->delete; |
84 |
- |
|
|