|
Lines 858-863
subtest 'get_marc_components() tests' => sub {
Link Here
|
| 858 |
subtest 'get_components_query' => sub { |
858 |
subtest 'get_components_query' => sub { |
| 859 |
plan tests => 12; |
859 |
plan tests => 12; |
| 860 |
|
860 |
|
|
|
861 |
$schema->storage->txn_begin; |
| 862 |
|
| 861 |
my $biblio = $builder->build_sample_biblio(); |
863 |
my $biblio = $builder->build_sample_biblio(); |
| 862 |
my $biblionumber = $biblio->biblionumber; |
864 |
my $biblionumber = $biblio->biblionumber; |
| 863 |
my $record = $biblio->metadata->record; |
865 |
my $record = $biblio->metadata->record; |
|
Lines 895-905
subtest 'get_components_query' => sub {
Link Here
|
| 895 |
is($comp_sort, "title_asc", "$engine: UseControlNumber enabled with MarcOrgCode sort if correct"); |
897 |
is($comp_sort, "title_asc", "$engine: UseControlNumber enabled with MarcOrgCode sort if correct"); |
| 896 |
$record->delete_field($marc_003_field); |
898 |
$record->delete_field($marc_003_field); |
| 897 |
} |
899 |
} |
|
|
900 |
|
| 901 |
$schema->storage->txn_rollback; |
| 902 |
|
| 898 |
}; |
903 |
}; |
| 899 |
|
904 |
|
| 900 |
subtest 'get_volumes_query' => sub { |
905 |
subtest 'get_volumes_query' => sub { |
| 901 |
plan tests => 3; |
906 |
plan tests => 3; |
| 902 |
|
907 |
|
|
|
908 |
$schema->storage->txn_begin; |
| 909 |
|
| 903 |
my $biblio = $builder->build_sample_biblio(); |
910 |
my $biblio = $builder->build_sample_biblio(); |
| 904 |
my $biblionumber = $biblio->biblionumber; |
911 |
my $biblionumber = $biblio->biblionumber; |
| 905 |
my $record = $biblio->metadata->record; |
912 |
my $record = $biblio->metadata->record; |
|
Lines 940-945
subtest 'get_volumes_query' => sub {
Link Here
|
| 940 |
"(((rcn:$biblionumber AND cni:OSt) OR rcn:\"OSt $biblionumber\") NOT (bib-level:a OR bib-level:b))", |
947 |
"(((rcn:$biblionumber AND cni:OSt) OR rcn:\"OSt $biblionumber\") NOT (bib-level:a OR bib-level:b))", |
| 941 |
"UseControlNumber enabled with MarcOrgCode" |
948 |
"UseControlNumber enabled with MarcOrgCode" |
| 942 |
); |
949 |
); |
|
|
950 |
|
| 951 |
$schema->storage->txn_rollback; |
| 943 |
}; |
952 |
}; |
| 944 |
|
953 |
|
| 945 |
subtest 'generate_marc_host_field' => sub { |
954 |
subtest 'generate_marc_host_field' => sub { |
|
Lines 1014-1021
subtest 'generate_marc_host_field' => sub {
Link Here
|
| 1014 |
is( $link->subfield('y'), undef, 'MARC::Field->subfield(w) returns undef if 010a is empty' ); |
1023 |
is( $link->subfield('y'), undef, 'MARC::Field->subfield(w) returns undef if 010a is empty' ); |
| 1015 |
is( $link->subfield('0'), '1234', 'MARC::Field->subfield(0) returns content from 001' ); |
1024 |
is( $link->subfield('0'), '1234', 'MARC::Field->subfield(0) returns content from 001' ); |
| 1016 |
|
1025 |
|
| 1017 |
$schema->storage->txn_rollback; |
|
|
| 1018 |
t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' ); |
1026 |
t::lib::Mocks::mock_preference( 'marcflavour', 'MARC21' ); |
|
|
1027 |
|
| 1028 |
$schema->storage->txn_rollback; |
| 1019 |
}; |
1029 |
}; |
| 1020 |
|
1030 |
|
| 1021 |
subtest 'link_marc_host' => sub { |
1031 |
subtest 'link_marc_host' => sub { |
| 1022 |
- |
|
|