Lines 373-379
ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
Link Here
|
373 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
373 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
374 |
is($results_hashref->{biblioserver}->{hits}, 19, "getRecords generated keyword search for 'salud' matched right number of records"); |
374 |
is($results_hashref->{biblioserver}->{hits}, 19, "getRecords generated keyword search for 'salud' matched right number of records"); |
375 |
|
375 |
|
376 |
my @newresults = searchResults('opac', $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 18, 0, 0, |
376 |
my @newresults = searchResults({'interface' => 'opac'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 18, 0, 0, |
377 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
377 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
378 |
is(scalar @newresults,18, "searchResults returns requested number of hits"); |
378 |
is(scalar @newresults,18, "searchResults returns requested number of hits"); |
379 |
|
379 |
|
Lines 455-461
ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
Link Here
|
455 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
455 |
($error, $results_hashref, $facets_loop) = getRecords($query,$simple_query,[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
456 |
is($results_hashref->{biblioserver}->{hits}, 26, "getRecords generated availability-limited search matched right number of records"); |
456 |
is($results_hashref->{biblioserver}->{hits}, 26, "getRecords generated availability-limited search matched right number of records"); |
457 |
|
457 |
|
458 |
@newresults = searchResults('opac', $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, |
458 |
@newresults = searchResults({'interface'=>'opac'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, |
459 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
459 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
460 |
my $allavailable = 'true'; |
460 |
my $allavailable = 'true'; |
461 |
foreach my $result (@newresults) { |
461 |
foreach my $result (@newresults) { |
Lines 593-599
ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
Link Here
|
593 |
# Let's just test a few other bits and bobs, just for fun |
593 |
# Let's just test a few other bits and bobs, just for fun |
594 |
|
594 |
|
595 |
($error, $results_hashref, $facets_loop) = getRecords("Godzina pąsowej róży","Godzina pąsowej róży",[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
595 |
($error, $results_hashref, $facets_loop) = getRecords("Godzina pąsowej róży","Godzina pąsowej róży",[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
596 |
@newresults = searchResults('intranet', $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, |
596 |
@newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, |
597 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
597 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
598 |
is($newresults[0]->{'alternateholdings_count'}, 1, 'Alternate holdings filled in correctly'); |
598 |
is($newresults[0]->{'alternateholdings_count'}, 1, 'Alternate holdings filled in correctly'); |
599 |
|
599 |
|
Lines 612-618
ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
Link Here
|
612 |
}); |
612 |
}); |
613 |
|
613 |
|
614 |
($error, $results_hashref, $facets_loop) = getRecords("TEST12121212","TEST12121212",[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
614 |
($error, $results_hashref, $facets_loop) = getRecords("TEST12121212","TEST12121212",[ ], [ 'biblioserver' ],20,0,undef,\%branches,\%itemtypes,$query_type,0); |
615 |
@newresults = searchResults('intranet', $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, |
615 |
@newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0, |
616 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
616 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
617 |
ok(!exists($newresults[0]->{norequests}), 'presence of a transit does not block hold request action (bug 10741)'); |
617 |
ok(!exists($newresults[0]->{norequests}), 'presence of a transit does not block hold request action (bug 10741)'); |
618 |
|
618 |
|
Lines 620-626
ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
Link Here
|
620 |
( undef, $results_hashref, $facets_loop ) = |
620 |
( undef, $results_hashref, $facets_loop ) = |
621 |
getRecords('ti:punctuation', 'punctuation', [], [ 'biblioserver' ], '19', 0, undef, \%branches, \%itemtypes, 'ccl', undef); |
621 |
getRecords('ti:punctuation', 'punctuation', [], [ 'biblioserver' ], '19', 0, undef, \%branches, \%itemtypes, 'ccl', undef); |
622 |
is($results_hashref->{biblioserver}->{hits}, 1, "search for ti:punctuation returned expected number of records"); |
622 |
is($results_hashref->{biblioserver}->{hits}, 1, "search for ti:punctuation returned expected number of records"); |
623 |
warning_like { @newresults = searchResults('intranet', $query_desc, |
623 |
warning_like { @newresults = searchResults({'intranet' => 'intranet'}, $query_desc, |
624 |
$results_hashref->{'biblioserver'}->{'hits'}, 20, 0, 0, |
624 |
$results_hashref->{'biblioserver'}->{'hits'}, 20, 0, 0, |
625 |
$results_hashref->{'biblioserver'}->{"RECORDS"}) } |
625 |
$results_hashref->{'biblioserver'}->{"RECORDS"}) } |
626 |
qr/^ERROR DECODING RECORD - Tag "50%" is not a valid tag/, |
626 |
qr/^ERROR DECODING RECORD - Tag "50%" is not a valid tag/, |
Lines 758-764
ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],'
Link Here
|
758 |
( undef, $results_hashref, $facets_loop ) = |
758 |
( undef, $results_hashref, $facets_loop ) = |
759 |
getRecords('ti:marc the large record', '', [], [ 'biblioserver' ], '20', 0, undef, \%branches, \%itemtypes, 'ccl', undef); |
759 |
getRecords('ti:marc the large record', '', [], [ 'biblioserver' ], '20', 0, undef, \%branches, \%itemtypes, 'ccl', undef); |
760 |
is($results_hashref->{biblioserver}->{hits}, 1, "Can do a search that retrieves an over-large bib record (bug 11096)"); |
760 |
is($results_hashref->{biblioserver}->{hits}, 1, "Can do a search that retrieves an over-large bib record (bug 11096)"); |
761 |
@newresults = searchResults('opac', $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 10, 0, 0, |
761 |
@newresults = searchResults({'interface' =>'opac'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 10, 0, 0, |
762 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
762 |
$results_hashref->{'biblioserver'}->{"RECORDS"}); |
763 |
is($newresults[0]->{title}, 'Marc the Large Record', 'Able to render the title for over-large bib record (bug 11096)'); |
763 |
is($newresults[0]->{title}, 'Marc the Large Record', 'Able to render the title for over-large bib record (bug 11096)'); |
764 |
is($newresults[0]->{biblionumber}, '300', 'Over-large bib record has the correct biblionumber (bug 11096)'); |
764 |
is($newresults[0]->{biblionumber}, '300', 'Over-large bib record has the correct biblionumber (bug 11096)'); |
765 |
- |
|
|