diff --git a/t/db_dependent/Labels/t_Layout.t b/t/db_dependent/Labels/t_Layout.t index bf6209d099..6271f125cd 100755 --- a/t/db_dependent/Labels/t_Layout.t +++ b/t/db_dependent/Labels/t_Layout.t @@ -20,12 +20,17 @@ use Modern::Perl; use Test::More tests => 58; + use C4::Context; +use Koha::Database; BEGIN { use_ok('C4::Labels::Layout'); } +my $schema = Koha::Database->new->schema; +$schema->storage->txn_begin; + my $default_layout = { barcode_type => 'CODE39', callnum_split => 0, @@ -118,3 +123,4 @@ is($updated_layout->get_text_wrap_cols(label_width => 180, left_text_margin => 1 my $del_results = $updated_layout->delete(); ok( ! defined($del_results) , "Layout->delete() success"); +$schema->storage->txn_rollback; diff --git a/t/db_dependent/Labels/t_Profile.t b/t/db_dependent/Labels/t_Profile.t index 40962523bc..7139c7e4e0 100755 --- a/t/db_dependent/Labels/t_Profile.t +++ b/t/db_dependent/Labels/t_Profile.t @@ -20,12 +20,17 @@ use Modern::Perl; use Test::More tests => 27; + use C4::Context; +use Koha::Database; BEGIN { use_ok('C4::Labels::Profile'); } +my $schema = Koha::Database->new->schema; +$schema->storage->txn_begin; + my $expected_profile = { creator => 'Labels', printer_name => 'Circulation Desk', @@ -95,3 +100,4 @@ is_deeply($updated_profile, $saved_profile, "Updated layout object verify succes my $del_results = $updated_profile->delete(); ok($del_results ne -1, "Profile->delete() success"); +$schema->storage->txn_rollback; diff --git a/t/db_dependent/Labels/t_Template.t b/t/db_dependent/Labels/t_Template.t index 8cf4cd65cf..98a04d30c9 100755 --- a/t/db_dependent/Labels/t_Template.t +++ b/t/db_dependent/Labels/t_Template.t @@ -20,12 +20,17 @@ use Modern::Perl; use Test::More tests => 54; + use C4::Context; +use Koha::Database; BEGIN { use_ok('C4::Labels::Template'); } +my $schema = Koha::Database->new->schema; +$schema->storage->txn_begin; + my $expect_template = { creator => 'Labels', profile_id => 0, @@ -135,3 +140,4 @@ foreach my $key (keys %{$expect_conv}) { my $del_results = $updated_template->delete(); ok($del_results ne -1, "Template->delete() success"); +$schema->storage->txn_rollback;