From 8fcd788c6d52348bc05f15c67a86494053995087 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Thu, 5 Nov 2015 11:05:29 -0300 Subject: [PATCH] Bug 14836: (QA followup) Add missing transaction Bug 15081 removed transaction handling from t::lib::TestBuilder so this patchset had to be ammended to handle it on its own. Signed-off-by: Tomas Cohen Arazi --- t/db_dependent/Koha/Patron/Categories.t | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/t/db_dependent/Koha/Patron/Categories.t b/t/db_dependent/Koha/Patron/Categories.t index d468175..974b982 100644 --- a/t/db_dependent/Koha/Patron/Categories.t +++ b/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; -- 2.6.2