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

(-)a/C4/Circulation.pm (+1 lines)
Lines 3977-3982 sub GetAgeRestriction { Link Here
3977
    my ($record_restrictions, $borrower) = @_;
3977
    my ($record_restrictions, $borrower) = @_;
3978
    my $markers = C4::Context->preference('AgeRestrictionMarker');
3978
    my $markers = C4::Context->preference('AgeRestrictionMarker');
3979
3979
3980
    return unless $record_restrictions;
3980
    # Split $record_restrictions to something like FSK 16 or PEGI 6
3981
    # Split $record_restrictions to something like FSK 16 or PEGI 6
3981
    my @values = split ' ', uc($record_restrictions);
3982
    my @values = split ' ', uc($record_restrictions);
3982
    return unless @values;
3983
    return unless @values;
(-)a/t/Circulation/AgeRestrictionMarkers.t (-2 / +12 lines)
Lines 21-27 Link Here
21
use Modern::Perl;
21
use Modern::Perl;
22
22
23
use DateTime;
23
use DateTime;
24
use Test::More tests => 7;
24
use Test::More tests => 8;
25
use Test::Warn;
25
26
26
use t::lib::Mocks;
27
use t::lib::Mocks;
27
28
Lines 64-69 subtest 'Patron tests - 15 years old (Time Zone shifts)' => sub { Link Here
64
    }
65
    }
65
};
66
};
66
67
68
subtest 'No age restriction' => sub {
69
    plan tests => 1;
70
71
    warning_is {
72
        C4::Circulation::GetAgeRestriction();
73
    }
74
    undef, "No warning if GetAgeRestriction is called without restriction";
75
76
};
77
67
# The Patron tests
78
# The Patron tests
68
sub TestPatron {
79
sub TestPatron {
69
    my ($borrower,$offset) = @_;
80
    my ($borrower,$offset) = @_;
70
- 

Return to bug 24361