From 0a139d53d387f715ccf6aacd557acb89592095f1 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 --- t/db_dependent/TestBuilder_txn.t | 45 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 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..9dc4b99 --- /dev/null +++ b/t/db_dependent/TestBuilder_txn.t @@ -0,0 +1,45 @@ +#!/usr/bin/perl + +# This script includes tests for GetReserveFee and ChargeReserveFee + +# Copyright 2015 Rijksmuseum +# +# This file is part of Koha. +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + +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; +my $builder = t::lib::TestBuilder->new(); + +# 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 reserves"); + +$dbh->rollback; -- 1.7.10.4