Lines 1-10
Link Here
|
1 |
#!/usr/bin/perl |
1 |
#!/usr/bin/perl |
|
|
2 |
|
3 |
# This file is part of Koha. |
4 |
# |
5 |
# Koha is free software; you can redistribute it and/or modify it |
6 |
# under the terms of the GNU General Public License as published by |
7 |
# the Free Software Foundation; either version 3 of the License, or |
8 |
# (at your option) any later version. |
9 |
# |
10 |
# Koha is distributed in the hope that it will be useful, but |
11 |
# WITHOUT ANY WARRANTY; without even the implied warranty of |
12 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 |
# GNU General Public License for more details. |
2 |
# |
14 |
# |
3 |
# This Koha test module is a stub! |
15 |
# You should have received a copy of the GNU General Public License |
4 |
# Add more tests here!!! |
16 |
# along with Koha; if not, see <http://www.gnu.org/licenses>. |
|
|
17 |
|
18 |
use Modern::Perl; |
5 |
|
19 |
|
6 |
use strict; |
|
|
7 |
use warnings; |
8 |
use utf8; |
20 |
use utf8; |
9 |
|
21 |
|
10 |
use YAML; |
22 |
use YAML; |
Lines 675-681
if ( $indexing_mode eq 'dom' ) {
Link Here
|
675 |
# make one of the test items appear to be in transit |
687 |
# make one of the test items appear to be in transit |
676 |
my $circ_module = new Test::MockModule('C4::Circulation'); |
688 |
my $circ_module = new Test::MockModule('C4::Circulation'); |
677 |
$circ_module->mock('GetTransfers', sub { |
689 |
$circ_module->mock('GetTransfers', sub { |
678 |
my $itemnumber = shift; |
690 |
my $itemnumber = shift // -1; |
679 |
if ($itemnumber == 11) { |
691 |
if ($itemnumber == 11) { |
680 |
return ('2013-07-19', 'MPL', 'CPL'); |
692 |
return ('2013-07-19', 'MPL', 'CPL'); |
681 |
} else { |
693 |
} else { |
Lines 833-838
if ( $indexing_mode eq 'dom' ) {
Link Here
|
833 |
is($newresults[0]->{biblionumber}, '300', 'Over-large bib record has the correct biblionumber (bug 11096)'); |
845 |
is($newresults[0]->{biblionumber}, '300', 'Over-large bib record has the correct biblionumber (bug 11096)'); |
834 |
like($newresults[0]->{notes}, qr/This is large note #550/, 'Able to render the notes field for over-large bib record (bug 11096)'); |
846 |
like($newresults[0]->{notes}, qr/This is large note #550/, 'Able to render the notes field for over-large bib record (bug 11096)'); |
835 |
|
847 |
|
|
|
848 |
# notforloancount should be returned as part of searchResults output |
849 |
ok( defined $newresults[0]->{notforloancount}, |
850 |
'\'notforloancount\' defined in searchResults output (Bug 12419)'); |
851 |
is( $newresults[0]->{notforloancount}, 2, |
852 |
'\'notforloancount\' == 2 (Bug 12419)'); |
853 |
|
836 |
# verify that we don't attempt to sort if no results were returned |
854 |
# verify that we don't attempt to sort if no results were returned |
837 |
# because of a query error |
855 |
# because of a query error |
838 |
warning_like {( undef, $results_hashref, $facets_loop ) = |
856 |
warning_like {( undef, $results_hashref, $facets_loop ) = |
Lines 914-925
sub run_unimarc_search_tests {
Link Here
|
914 |
} |
932 |
} |
915 |
|
933 |
|
916 |
subtest 'MARC21 + GRS-1' => sub { |
934 |
subtest 'MARC21 + GRS-1' => sub { |
917 |
plan tests => 104; |
935 |
plan tests => 106; |
918 |
run_marc21_search_tests('grs1'); |
936 |
run_marc21_search_tests('grs1'); |
919 |
}; |
937 |
}; |
920 |
|
938 |
|
921 |
subtest 'MARC21 + DOM' => sub { |
939 |
subtest 'MARC21 + DOM' => sub { |
922 |
plan tests => 104; |
940 |
plan tests => 106; |
923 |
run_marc21_search_tests('dom'); |
941 |
run_marc21_search_tests('dom'); |
924 |
}; |
942 |
}; |
925 |
|
943 |
|