View | Details | Raw Unified | Return to bug 30788
Collapse All | Expand All

(-)a/t/db_dependent/Circulation/CalcFine.t (-2 / +42 lines)
Lines 2-8 Link Here
2
2
3
use Modern::Perl;
3
use Modern::Perl;
4
4
5
use Test::More tests => 4;
5
use Test::More tests => 5;
6
use Test::Warn;
6
7
7
use C4::Context;
8
use C4::Context;
8
use C4::Overdues qw( CalcFine );
9
use C4::Overdues qw( CalcFine );
Lines 100-105 subtest 'Test basic functionality' => sub { Link Here
100
    teardown();
101
    teardown();
101
};
102
};
102
103
104
subtest 'Test with fine amount empty' => sub {
105
    plan tests => 1;
106
107
    Koha::CirculationRules->set_rules(
108
        {
109
            branchcode   => undef,
110
            categorycode => undef,
111
            itemtype     => undef,
112
            rules        => {
113
                fine                          => '',
114
                lengthunit                    => 'days',
115
                finedays                      => 0,
116
                firstremind                   => 0,
117
                chargeperiod                  => 1,
118
                overduefinescap               => undef,
119
                cap_fine_to_replacement_price => 1,
120
            },
121
        }
122
    );
123
124
    my $start_dt = DateTime->new(
125
        year       => 2000,
126
        month      => 1,
127
        day        => 1,
128
    );
129
130
    my $end_dt = DateTime->new(
131
        year       => 2000,
132
        month      => 1,
133
        day        => 30,
134
    );
135
136
    warning_is {
137
    my ($amount) = CalcFine( $item->unblessed, $patron->{categorycode}, $branch->{branchcode}, $start_dt, $end_dt );
138
    }
139
    undef, "No warning when fine amount is ''";
140
141
    teardown();
142
};
143
103
subtest 'Test cap_fine_to_replacement_price' => sub {
144
subtest 'Test cap_fine_to_replacement_price' => sub {
104
    plan tests => 2;
145
    plan tests => 2;
105
146
106
- 

Return to bug 30788