Lines 188-198
subtest 'can_be_transferred' => sub {
Link Here
|
188 |
}; |
188 |
}; |
189 |
|
189 |
|
190 |
subtest 'custom_cover_image_url' => sub { |
190 |
subtest 'custom_cover_image_url' => sub { |
191 |
plan tests => 2; |
191 |
plan tests => 3; |
192 |
|
192 |
|
193 |
t::lib::Mocks::mock_preference( 'CustomCoverImagesURL', 'https://my_url/%isbn%_%issn%.png' ); |
193 |
t::lib::Mocks::mock_preference( 'CustomCoverImagesURL', 'https://my_url/%isbn%_%issn%.png' ); |
194 |
|
194 |
|
195 |
my $isbn = 'my_isbn'; |
195 |
my $isbn = '0553573403 | 9780553573404 (pbk.).png'; |
196 |
my $issn = 'my_issn'; |
196 |
my $issn = 'my_issn'; |
197 |
my $marc_record = MARC::Record->new; |
197 |
my $marc_record = MARC::Record->new; |
198 |
my ( $biblionumber, undef ) = C4::Biblio::AddBiblio($marc_record, ''); |
198 |
my ( $biblionumber, undef ) = C4::Biblio::AddBiblio($marc_record, ''); |
Lines 208-213
subtest 'custom_cover_image_url' => sub {
Link Here
|
208 |
|
208 |
|
209 |
t::lib::Mocks::mock_preference( 'CustomCoverImagesURL', 'https://my_url/%024$a%.png' ); |
209 |
t::lib::Mocks::mock_preference( 'CustomCoverImagesURL', 'https://my_url/%024$a%.png' ); |
210 |
is( $biblio->custom_cover_image_url, "https://my_url/$marc_024a.png" ); |
210 |
is( $biblio->custom_cover_image_url, "https://my_url/$marc_024a.png" ); |
|
|
211 |
|
212 |
t::lib::Mocks::mock_preference( 'CustomCoverImagesURL', 'https://my_url/%normalized_isbn%.png' ); |
213 |
my $normalized_isbn = C4::Koha::GetNormalizedISBN($isbn); |
214 |
is( $biblio->custom_cover_image_url, "https://my_url/$normalized_isbn.png" ); |
211 |
}; |
215 |
}; |
212 |
|
216 |
|
213 |
$schema->storage->txn_rollback; |
217 |
$schema->storage->txn_rollback; |
214 |
- |
|
|