Lines 41-48
$module->mock('GetAuthority', sub {
Link Here
|
41 |
$record->add_fields( |
41 |
$record->add_fields( |
42 |
[ '001', '2' ], |
42 |
[ '001', '2' ], |
43 |
[ '151', ' ', ' ', a => 'New York (State)' ], |
43 |
[ '151', ' ', ' ', a => 'New York (State)' ], |
44 |
[ '551', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ] |
44 |
[ '551', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ], |
45 |
); |
45 |
[ '751', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ], |
|
|
46 |
[ '781', ' ', ' ', a => 'New York', x => 'General subdivision', 9 => '1' ] |
47 |
); |
46 |
} elsif ($authid eq '3') { |
48 |
} elsif ($authid eq '3') { |
47 |
$record->add_fields( |
49 |
$record->add_fields( |
48 |
[ '001', '3' ], |
50 |
[ '001', '3' ], |
Lines 151-164
my $expected_marc21_summary = {
Link Here
|
151 |
'type' => 'broader' |
153 |
'type' => 'broader' |
152 |
} |
154 |
} |
153 |
], |
155 |
], |
154 |
'seefrom' => [], |
156 |
'equalterm' => [ |
155 |
'label' => 'Geographic Name', |
157 |
{ |
156 |
'type' => 'Geographic Name', |
158 |
'field' => '751', |
157 |
'equalterm' => [] |
159 |
'hemain' => 'United States', |
|
|
160 |
'heading' => 'United States' |
161 |
}, |
162 |
{ |
163 |
'hemain' => undef, |
164 |
'field' => '781', |
165 |
'heading' => 'General subdivision' |
166 |
} |
167 |
], |
168 |
'seefrom' => [], |
169 |
'label' => 'Geographic Name', |
170 |
'type' => 'Geographic Name', |
158 |
}; |
171 |
}; |
159 |
|
172 |
|
160 |
is_deeply( |
173 |
is_deeply( |
161 |
BuildSummary(C4::AuthoritiesMarc::GetAuthority(2), 2, 'GEOGR_NAME'), |
174 |
BuildSummary( C4::AuthoritiesMarc::GetAuthority(2), 2, 'GEOGR_NAME' ), |
162 |
$expected_marc21_summary, |
175 |
$expected_marc21_summary, |
163 |
'test BuildSummary for MARC21' |
176 |
'test BuildSummary for MARC21' |
164 |
); |
177 |
); |
165 |
- |
|
|