Lines 583-589
subtest 'get_components_query' => sub {
Link Here
|
583 |
$biblio = Koha::Biblios->find( $biblio->biblionumber); |
583 |
$biblio = Koha::Biblios->find( $biblio->biblionumber); |
584 |
|
584 |
|
585 |
( $comp_q, $comp_s ) = $biblio->get_components_query; |
585 |
( $comp_q, $comp_s ) = $biblio->get_components_query; |
586 |
is($comp_q, "(rcn:$biblionumber AND (bib-level:a OR bib-level:b))", "UseControlNumber enabled without MarcOrgCode"); |
586 |
is($comp_q, "(rcn:\"$biblionumber\" AND (bib-level:a OR bib-level:b))", "UseControlNumber enabled without MarcOrgCode"); |
587 |
is($comp_s, "author_az", "UseControlNumber enabled without MarcOrgCode sort is correct"); |
587 |
is($comp_s, "author_az", "UseControlNumber enabled without MarcOrgCode sort is correct"); |
588 |
|
588 |
|
589 |
my $marc_003_field = MARC::Field->new('003', 'OSt'); |
589 |
my $marc_003_field = MARC::Field->new('003', 'OSt'); |
Lines 594-600
subtest 'get_components_query' => sub {
Link Here
|
594 |
t::lib::Mocks::mock_preference( 'ComponentSortField', 'title' ); |
594 |
t::lib::Mocks::mock_preference( 'ComponentSortField', 'title' ); |
595 |
t::lib::Mocks::mock_preference( 'ComponentSortOrder', 'asc' ); |
595 |
t::lib::Mocks::mock_preference( 'ComponentSortOrder', 'asc' ); |
596 |
( $comp_q, $comp_s ) = $biblio->get_components_query; |
596 |
( $comp_q, $comp_s ) = $biblio->get_components_query; |
597 |
is($comp_q, "(((rcn:$biblionumber AND cni:OSt) OR rcn:\"OSt $biblionumber\") AND (bib-level:a OR bib-level:b))", "UseControlNumber enabled with MarcOrgCode"); |
597 |
is($comp_q, "(((rcn:\"$biblionumber\" AND cni:\"OSt\") OR rcn:\"OSt $biblionumber\") AND (bib-level:a OR bib-level:b))", "UseControlNumber enabled with MarcOrgCode"); |
598 |
is($comp_s, "title_asc", "UseControlNumber enabled with MarcOrgCode sort if correct"); |
598 |
is($comp_s, "title_asc", "UseControlNumber enabled with MarcOrgCode sort if correct"); |
599 |
}; |
599 |
}; |
600 |
|
600 |
|
601 |
- |
|
|