Bug 35989: (QA follow-up): Fix QA tests
Some file tidying to pass the QA tests Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
95f2aecc1b
commit
361ec4b2ea
2 changed files with 40 additions and 36 deletions
|
@ -1009,9 +1009,9 @@ sub BuildSummary {
|
|||
} } $record->field('7..');
|
||||
|
||||
} else {
|
||||
# construct MARC21 summary
|
||||
# FIXME - looping over 1XX is questionable
|
||||
# since MARC21 authority should have only one 1XX
|
||||
# construct MARC21 summary
|
||||
# FIXME - looping over 1XX is questionable
|
||||
# since MARC21 authority should have only one 1XX
|
||||
use C4::Heading::MARC21;
|
||||
my $handler = C4::Heading::MARC21->new();
|
||||
my $subfields_to_report;
|
||||
|
|
|
@ -29,15 +29,17 @@ $module->mock('GetHeaderAuthority', sub {
|
|||
$module->mock('AddAuthorityTrees', sub {
|
||||
return;
|
||||
});
|
||||
$module->mock('GetAuthority', sub {
|
||||
$module->mock(
|
||||
'GetAuthority',
|
||||
sub {
|
||||
my ($authid) = @_;
|
||||
my $record = MARC::Record->new();
|
||||
if ($authid eq '1') {
|
||||
if ( $authid eq '1' ) {
|
||||
$record->add_fields(
|
||||
[ '001', '1' ],
|
||||
[ '151', ' ', ' ', a => 'United States' ]
|
||||
);
|
||||
} elsif ($authid eq '2') {
|
||||
} elsif ( $authid eq '2' ) {
|
||||
$record->add_fields(
|
||||
[ '001', '2' ],
|
||||
[ '151', ' ', ' ', a => 'New York (State)' ],
|
||||
|
@ -45,19 +47,19 @@ $module->mock('GetAuthority', sub {
|
|||
[ '751', ' ', ' ', a => 'United States', w => 'g', 9 => '1' ],
|
||||
[ '781', ' ', ' ', a => 'New York', x => 'General subdivision', 9 => '1' ]
|
||||
);
|
||||
} elsif ($authid eq '3') {
|
||||
} elsif ( $authid eq '3' ) {
|
||||
$record->add_fields(
|
||||
[ '001', '3' ],
|
||||
[ '151', ' ', ' ', a => 'New York (City)' ],
|
||||
[ '551', ' ', ' ', a => 'New York (State)', w => 'g', 9 => '2' ]
|
||||
);
|
||||
} elsif ($authid eq '4') {
|
||||
} elsif ( $authid eq '4' ) {
|
||||
$record->add_fields(
|
||||
[ '001', '4' ],
|
||||
[ '151', ' ', ' ', a => 'New York (City)' ],
|
||||
[ '551', ' ', ' ', a => 'New York (State)', w => 'g' ]
|
||||
);
|
||||
} elsif ($authid eq '5') {
|
||||
} elsif ( $authid eq '5' ) {
|
||||
$record->add_fields(
|
||||
[ '001', '5' ],
|
||||
[ '100', ' ', ' ', a => 'Lastname, Firstname', b => 'b', c => 'c', i => 'i' ]
|
||||
|
@ -66,7 +68,9 @@ $module->mock('GetAuthority', sub {
|
|||
undef $record;
|
||||
}
|
||||
return $record;
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
my $schema = Koha::Database->new->schema;
|
||||
$schema->storage->txn_begin;
|
||||
|
|
Loading…
Reference in a new issue