@@ -, +, @@ --- t/db_dependent/Koha/Patron/Categories.t | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/t/db_dependent/Koha/Patron/Categories.t +++ a/t/db_dependent/Koha/Patron/Categories.t @@ -18,11 +18,17 @@ # along with Koha; if not, see . use Modern::Perl; + use Test::More tests => 5; + +use Koha::Database; use Koha::Patron::Category; use Koha::Patron::Categories; use t::lib::TestBuilder; +my $schema = Koha::Database->new->schema; +$schema->storage->txn_begin; + my $builder = t::lib::TestBuilder->new; my $branch = $builder->build({ source => 'Branch', }); my $nb_of_categories = Koha::Patron::Categories->search->count; @@ -45,3 +51,7 @@ is_deeply( $retrieved_category_1->default_messaging, [], 'By default there is no $retrieved_category_1->delete; is( Koha::Patron::Categories->search->count, $nb_of_categories + 1, 'Delete should have deleted the patron category' ); + +$schema->storage->txn_rollback; + +1; --