Lines 740-752
subtest "LinkBibHeadingsToAuthorities record generation tests" => sub {
Link Here
|
740 |
); |
740 |
); |
741 |
|
741 |
|
742 |
#Add test for this case using verbose |
742 |
#Add test for this case using verbose |
743 |
my ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); |
743 |
( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); |
744 |
my $details = $results->{details}; |
744 |
my $details = $results->{details}; |
745 |
is( $num_headings_changed, 1, 'We changed the one we passed' ); |
745 |
is( $num_headings_changed, 1, 'We changed the one we passed' ); |
746 |
is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); |
746 |
is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); |
747 |
|
747 |
|
748 |
# Now we check the authority record itself |
748 |
# Now we check the authority record itself |
749 |
my $authority = GetAuthority($results->{details}->[0]->{authid}); |
749 |
$authority = GetAuthority($results->{details}->[0]->{authid}); |
750 |
|
750 |
|
751 |
is( $authority->field('150')->as_string(), |
751 |
is( $authority->field('150')->as_string(), |
752 |
"Beach city Weirdness Fiction Books 21st Century Fish Stew Pizza", |
752 |
"Beach city Weirdness Fiction Books 21st Century Fish Stew Pizza", |
Lines 773-785
subtest "LinkBibHeadingsToAuthorities record generation tests" => sub {
Link Here
|
773 |
"The generated record contains the correct subfields" |
773 |
"The generated record contains the correct subfields" |
774 |
); |
774 |
); |
775 |
|
775 |
|
776 |
# The same exemple With verbose |
776 |
# The same example With verbose |
777 |
( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); |
777 |
( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); |
778 |
is( $num_headings_changed, 1, 'We changed the one we passed' ); |
778 |
is( $num_headings_changed, 1, 'We changed the one we passed' ); |
779 |
is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); |
779 |
is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); |
780 |
|
780 |
|
781 |
# Now we check the authority record itself |
781 |
# Now we check the authority record itself |
782 |
my $authority = GetAuthority($results->{details}->[0]->{authid}); |
782 |
$authority = GetAuthority($results->{details}->[0]->{authid}); |
783 |
is( $authority->field('100')->as_string(), |
783 |
is( $authority->field('100')->as_string(), |
784 |
"Tolkien, J. R. R. (John Ronald Reuel), 1892-1973. Lord of the rings", |
784 |
"Tolkien, J. R. R. (John Ronald Reuel), 1892-1973. Lord of the rings", |
785 |
"The generated record contains the correct subfields" |
785 |
"The generated record contains the correct subfields" |
786 |
- |
|
|