From 1c969616cb12f9fa3224a089985132de2f45a78f 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 | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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..21351e8 --- /dev/null +++ b/t/db_dependent/TestBuilder_txn.t @@ -0,0 +1,32 @@ +#!/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; + +$dbh->rollback; + +print "I did reach this point though\n"; -- 1.7.10.4