|
Lines 194-199
sub run_tests {
Link Here
|
| 194 |
|
194 |
|
| 195 |
is( GetMarcPrice( $record_for_isbn, $marcflavour ), 100, |
195 |
is( GetMarcPrice( $record_for_isbn, $marcflavour ), 100, |
| 196 |
"GetMarcPrice returns the correct value"); |
196 |
"GetMarcPrice returns the correct value"); |
|
|
197 |
my $newincbiblioitemnumber=$biblioitemnumber+1; |
| 198 |
$dbh->do("UPDATE biblioitems SET biblioitemnumber = ? WHERE biblionumber = ?;", undef, $newincbiblioitemnumber, $biblionumber ); |
| 199 |
my $updatedrecord = GetMarcBiblio($biblionumber, 0); |
| 200 |
my $frameworkcode = GetFrameworkCode($biblionumber); |
| 201 |
my ( $biblioitem_tag, $biblioitem_subfield ) = GetMarcFromKohaField( "biblioitems.biblioitemnumber", $frameworkcode ); |
| 202 |
die qq{No biblioitemnumber tag for framework "$frameworkcode"} unless $biblioitem_tag; |
| 203 |
my $biblioitemnumbertotest; |
| 204 |
if ( $biblioitem_tag < 10 ) { |
| 205 |
$biblioitemnumbertotest = $updatedrecord->field($biblioitem_tag)->data(); |
| 206 |
} else { |
| 207 |
$biblioitemnumbertotest = $updatedrecord->field($biblioitem_tag)->subfield($biblioitem_subfield); |
| 208 |
} |
| 209 |
is ($newincbiblioitemnumber, $biblioitemnumbertotest); |
| 197 |
} |
210 |
} |
| 198 |
|
211 |
|
| 199 |
sub mock_marcfromkohafield { |
212 |
sub mock_marcfromkohafield { |
|
Lines 260-278
sub create_issn_field {
Link Here
|
| 260 |
} |
273 |
} |
| 261 |
|
274 |
|
| 262 |
subtest 'MARC21' => sub { |
275 |
subtest 'MARC21' => sub { |
| 263 |
plan tests => 27; |
276 |
plan tests => 28; |
| 264 |
run_tests('MARC21'); |
277 |
run_tests('MARC21'); |
| 265 |
$dbh->rollback; |
278 |
$dbh->rollback; |
| 266 |
}; |
279 |
}; |
| 267 |
|
280 |
|
| 268 |
subtest 'UNIMARC' => sub { |
281 |
subtest 'UNIMARC' => sub { |
| 269 |
plan tests => 27; |
282 |
plan tests => 28; |
| 270 |
run_tests('UNIMARC'); |
283 |
run_tests('UNIMARC'); |
| 271 |
$dbh->rollback; |
284 |
$dbh->rollback; |
| 272 |
}; |
285 |
}; |
| 273 |
|
286 |
|
| 274 |
subtest 'NORMARC' => sub { |
287 |
subtest 'NORMARC' => sub { |
| 275 |
plan tests => 27; |
288 |
plan tests => 28; |
| 276 |
run_tests('NORMARC'); |
289 |
run_tests('NORMARC'); |
| 277 |
$dbh->rollback; |
290 |
$dbh->rollback; |
| 278 |
}; |
291 |
}; |
| 279 |
- |
|
|