# along with Koha; if not, see <http://www.gnu.org/licenses>.
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;
$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;