|
Line 0
Link Here
|
| 0 |
- |
1 |
#!/usr/bin/perl |
|
|
2 |
|
| 3 |
# This script includes tests for GetReserveFee and ChargeReserveFee |
| 4 |
|
| 5 |
# Copyright 2015 Rijksmuseum |
| 6 |
# |
| 7 |
# This file is part of Koha. |
| 8 |
# |
| 9 |
# Koha is free software; you can redistribute it and/or modify it |
| 10 |
# under the terms of the GNU General Public License as published by |
| 11 |
# the Free Software Foundation; either version 3 of the License, or |
| 12 |
# (at your option) any later version. |
| 13 |
# |
| 14 |
# Koha is distributed in the hope that it will be useful, but |
| 15 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 |
# GNU General Public License for more details. |
| 18 |
# |
| 19 |
# You should have received a copy of the GNU General Public License |
| 20 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
| 21 |
|
| 22 |
use Modern::Perl; |
| 23 |
use Test::More tests => 1; |
| 24 |
|
| 25 |
use t::lib::TestBuilder; |
| 26 |
|
| 27 |
my $dbh = C4::Context->dbh; # after start transaction of testbuilder |
| 28 |
$dbh->{AutoCommit} = 0; |
| 29 |
$dbh->{RaiseError} = 1; |
| 30 |
my $builder = t::lib::TestBuilder->new(); |
| 31 |
|
| 32 |
# Category with hold fee, two patrons |
| 33 |
$builder->build({ |
| 34 |
source => 'Category', |
| 35 |
value => { |
| 36 |
categorycode => 'XYZ1', |
| 37 |
reservefee => 2.5, |
| 38 |
}, |
| 39 |
}); |
| 40 |
|
| 41 |
# Actual testing starts here! |
| 42 |
is(1, 1, 'OK' ); |
| 43 |
$dbh->do("DELETE FROM reserves"); |
| 44 |
|
| 45 |
$dbh->rollback; |