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

(-)a/t/db_dependent/Koha/Biblio.t (-2 / +25 lines)
Lines 17-23 Link Here
17
17
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Test::More tests => 26;
20
use Test::More tests => 27;
21
use Test::Exception;
21
use Test::Exception;
22
use Test::Warn;
22
use Test::Warn;
23
23
Lines 1132-1137 subtest 'ratings' => sub { Link Here
1132
    ok(1);
1132
    ok(1);
1133
};
1133
};
1134
1134
1135
subtest 'opac_summary_html' => sub {
1136
1137
    plan tests => 2;
1138
1139
    my $author = 'my author';
1140
    my $title  = 'my title';
1141
    my $isbn   = '9781250067128 | 125006712X';
1142
    my $biblio = $builder->build_sample_biblio( { author => $author, title => $title } );
1143
    $biblio->biblioitem->set( { isbn => '9781250067128 | 125006712X' } )->store;
1144
1145
    t::lib::Mocks::mock_preference( 'OPACMySummaryHTML', '' );
1146
    is( $biblio->opac_summary_html, '', 'opac_summary_html returns empty string if pref is off' );
1147
1148
    t::lib::Mocks::mock_preference(
1149
        'OPACMySummaryHTML',
1150
        'Replace {AUTHOR}, {TITLE}, {ISBN} AND {BIBLIONUMBER} please'
1151
    );
1152
    is(
1153
        $biblio->opac_summary_html,
1154
        sprintf( 'Replace %s, %s, %s AND %s please', $author, $title, $biblio->normalized_isbn, $biblio->biblionumber ),
1155
        'opac_summary_html replaces the different patterns'
1156
    );
1157
};
1158
1135
sub component_record1 {
1159
sub component_record1 {
1136
    my $marc = MARC::Record->new;
1160
    my $marc = MARC::Record->new;
1137
    $marc->append_fields(
1161
    $marc->append_fields(
1138
- 

Return to bug 33954