From 8667fc73487362e316923bdacfa43ffd8aee7134 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Fri, 28 Aug 2015 11:44:03 +0200 Subject: [PATCH] Used to test the change Content-Type: text/plain; charset=utf-8 This seems to work like it should not.. --- t/db_dependent/TestBuilder_txn.t | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 t/db_dependent/TestBuilder_txn.t diff --git a/t/db_dependent/TestBuilder_txn.t b/t/db_dependent/TestBuilder_txn.t new file mode 100755 index 0000000..ecb2a28 --- /dev/null +++ b/t/db_dependent/TestBuilder_txn.t @@ -0,0 +1,33 @@ +#!/usr/bin/perl + +use Modern::Perl; +use Test::More tests => 1; +use t::lib::TestBuilder; + +my $dbh = C4::Context->dbh; # after start transaction of testbuilder +$dbh->{AutoCommit} = 0; +$dbh->{RaiseError} = 1; +$dbh->do("INSERT INTO tags (entry) VALUES (?)",undef,('#$%'.time)); +my $builder = t::lib::TestBuilder->new(); +$dbh->do("INSERT INTO tags (entry) VALUES (?)",undef,('#$%'.time)); + +# Category with hold fee, two patrons +$builder->build({ + source => 'Category', + value => { + categorycode => 'XYZ1', + reservefee => 2.5, + }, +}); + +# Actual testing starts here! +is(1, 1, 'OK' ); +$dbh->do("DELETE FROM tags WHERE entry LIKE '#$%'"); + +#$builder->DESTROY; +undef $builder; +print "L29\n"; + +$dbh->rollback; + +print "I did reach this point though\n"; -- 1.7.10.4