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 1144-1149 subtest 'ratings' => sub { Link Here
1144
    ok(1);
1144
    ok(1);
1145
};
1145
};
1146
1146
1147
subtest 'opac_summary_html' => sub {
1148
1149
    plan tests => 2;
1150
1151
    my $author = 'my author';
1152
    my $title  = 'my title';
1153
    my $isbn   = '9781250067128 | 125006712X';
1154
    my $biblio = $builder->build_sample_biblio( { author => $author, title => $title } );
1155
    $biblio->biblioitem->set( { isbn => '9781250067128 | 125006712X' } )->store;
1156
1157
    t::lib::Mocks::mock_preference( 'OPACMySummaryHTML', '' );
1158
    is( $biblio->opac_summary_html, '', 'opac_summary_html returns empty string if pref is off' );
1159
1160
    t::lib::Mocks::mock_preference(
1161
        'OPACMySummaryHTML',
1162
        'Replace {AUTHOR}, {TITLE}, {ISBN} AND {BIBLIONUMBER} please'
1163
    );
1164
    is(
1165
        $biblio->opac_summary_html,
1166
        sprintf( 'Replace %s, %s, %s AND %s please', $author, $title, $biblio->normalized_isbn, $biblio->biblionumber ),
1167
        'opac_summary_html replaces the different patterns'
1168
    );
1169
};
1170
1147
sub component_record1 {
1171
sub component_record1 {
1148
    my $marc = MARC::Record->new;
1172
    my $marc = MARC::Record->new;
1149
    $marc->append_fields(
1173
    $marc->append_fields(
1150
- 

Return to bug 33954