|
Lines 38-44
set_mocks();
Link Here
|
| 38 |
# Framework operations |
38 |
# Framework operations |
| 39 |
my ( $authtype1, $authtype2 ) = modify_framework(); |
39 |
my ( $authtype1, $authtype2 ) = modify_framework(); |
| 40 |
|
40 |
|
| 41 |
subtest 'Test merge A1 to A2 (withing same authtype)' => sub { |
41 |
subtest 'Test merge A1 to A2 (within same authtype)' => sub { |
| 42 |
# Tests originate from bug 11700 |
42 |
# Tests originate from bug 11700 |
| 43 |
plan tests => 9; |
43 |
plan tests => 9; |
| 44 |
|
44 |
|
|
Lines 111-117
subtest 'Test merge A1 to modified A1' => sub {
Link Here
|
| 111 |
compare_field_count( $MARC1, $biblio1, 1 ); |
111 |
compare_field_count( $MARC1, $biblio1, 1 ); |
| 112 |
compare_field_order( $MARC1, $biblio1, 1 ); |
112 |
compare_field_order( $MARC1, $biblio1, 1 ); |
| 113 |
is( $auth1new->field(109)->subfield('a'), $biblio1->field(109)->subfield('a'), 'Record1 values updated correctly' ); |
113 |
is( $auth1new->field(109)->subfield('a'), $biblio1->field(109)->subfield('a'), 'Record1 values updated correctly' ); |
| 114 |
my $biblio2 = GetMarcBiblio($biblionumber1); |
114 |
my $biblio2 = GetMarcBiblio( $biblionumber2 ); |
| 115 |
compare_field_count( $MARC2, $biblio2, 1 ); |
115 |
compare_field_count( $MARC2, $biblio2, 1 ); |
| 116 |
compare_field_order( $MARC2, $biblio2, 1 ); |
116 |
compare_field_order( $MARC2, $biblio2, 1 ); |
| 117 |
is( $auth1new->field(109)->subfield('a'), $biblio2->field(109)->subfield('a'), 'Record2 values updated correctly' ); |
117 |
is( $auth1new->field(109)->subfield('a'), $biblio2->field(109)->subfield('a'), 'Record2 values updated correctly' ); |
|
Lines 233-239
sub modify_framework {
Link Here
|
| 233 |
}, |
233 |
}, |
| 234 |
}); |
234 |
}); |
| 235 |
|
235 |
|
| 236 |
# Link 112/712 to the second authtype |
236 |
# Link 112/612 to the second authtype |
| 237 |
$builder->build({ |
237 |
$builder->build({ |
| 238 |
source => 'MarcSubfieldStructure', |
238 |
source => 'MarcSubfieldStructure', |
| 239 |
value => { |
239 |
value => { |
|
Lines 246-252
sub modify_framework {
Link Here
|
| 246 |
$builder->build({ |
246 |
$builder->build({ |
| 247 |
source => 'MarcSubfieldStructure', |
247 |
source => 'MarcSubfieldStructure', |
| 248 |
value => { |
248 |
value => { |
| 249 |
tagfield => '712', |
249 |
tagfield => '612', |
| 250 |
tagsubfield => 'a', |
250 |
tagsubfield => 'a', |
| 251 |
authtypecode => $authtype2->{authtypecode}, |
251 |
authtypecode => $authtype2->{authtypecode}, |
| 252 |
frameworkcode => '', |
252 |
frameworkcode => '', |
| 253 |
- |
|
|