View | Details | Raw Unified | Return to bug 12419
Collapse All | Expand All

(-)a/t/db_dependent/Search.t (-7 / +25 lines)
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
(-)a/t/db_dependent/data/marc21/zebraexport/large_biblio_dom/exported_records.xml (+12 lines)
Lines 1659-1664 Link Here
1659
  <datafield tag="500" ind1=" " ind2=" ">
1659
  <datafield tag="500" ind1=" " ind2=" ">
1660
    <subfield code="a">This is a note.  This is a large note.  This is note that is so large, the margins of this terminal window are not nearly wide enough to contain it.  This is large note #550</subfield>
1660
    <subfield code="a">This is a note.  This is a large note.  This is note that is so large, the margins of this terminal window are not nearly wide enough to contain it.  This is large note #550</subfield>
1661
  </datafield>
1661
  </datafield>
1662
  <datafield tag="952" ind1=" " ind2=" ">
1663
    <subfield code="p">aaabbb</subfield>
1664
    <subfield code="7">1</subfield>
1665
  </datafield>
1666
  <datafield tag="952" ind1=" " ind2=" ">
1667
    <subfield code="p">bbbccc</subfield>
1668
    <subfield code="7">0</subfield>
1669
  </datafield>
1670
  <datafield tag="952" ind1=" " ind2=" ">
1671
    <subfield code="p">cccddd</subfield>
1672
    <subfield code="7">1</subfield>
1673
  </datafield>
1662
  <datafield tag="999" ind1=" " ind2=" ">
1674
  <datafield tag="999" ind1=" " ind2=" ">
1663
    <subfield code="c">300</subfield>
1675
    <subfield code="c">300</subfield>
1664
    <subfield code="d">300</subfield>
1676
    <subfield code="d">300</subfield>
(-)a/t/db_dependent/data/marc21/zebraexport/large_biblio_grs1/exported_records.xml (-1 / +12 lines)
Lines 1658-1663 Link Here
1658
  <datafield tag="500" ind1=" " ind2=" ">
1658
  <datafield tag="500" ind1=" " ind2=" ">
1659
    <subfield code="a">This is a note.  This is a large note.  This is note that is so large, the margins of this terminal window are not nearly wide enough to contain it.  This is large note #550</subfield>
1659
    <subfield code="a">This is a note.  This is a large note.  This is note that is so large, the margins of this terminal window are not nearly wide enough to contain it.  This is large note #550</subfield>
1660
  </datafield>
1660
  </datafield>
1661
  <datafield tag="952" ind1=" " ind2=" ">
1662
    <subfield code="p">aaabbb</subfield>
1663
    <subfield code="7">1</subfield>
1664
  </datafield>
1665
  <datafield tag="952" ind1=" " ind2=" ">
1666
    <subfield code="p">bbbccc</subfield>
1667
    <subfield code="7">0</subfield>
1668
  </datafield>
1669
  <datafield tag="952" ind1=" " ind2=" ">
1670
    <subfield code="p">cccddd</subfield>
1671
    <subfield code="7">1</subfield>
1672
  </datafield>
1661
  <datafield tag="999" ind1=" " ind2=" ">
1673
  <datafield tag="999" ind1=" " ind2=" ">
1662
    <subfield code="c">300</subfield>
1674
    <subfield code="c">300</subfield>
1663
    <subfield code="d">300</subfield>
1675
    <subfield code="d">300</subfield>
1664
- 

Return to bug 12419