Lines 767-779
subtest "LinkBibHeadingsToAuthorities record generation tests" => sub {
Link Here
|
767 |
); |
767 |
); |
768 |
|
768 |
|
769 |
#Add test for this case using verbose |
769 |
#Add test for this case using verbose |
770 |
my ( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); |
770 |
( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); |
771 |
my $details = $results->{details}; |
771 |
my $details = $results->{details}; |
772 |
is( $num_headings_changed, 1, 'We changed the one we passed' ); |
772 |
is( $num_headings_changed, 1, 'We changed the one we passed' ); |
773 |
is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); |
773 |
is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); |
774 |
|
774 |
|
775 |
# Now we check the authority record itself |
775 |
# Now we check the authority record itself |
776 |
my $authority = GetAuthority($results->{details}->[0]->{authid}); |
776 |
$authority = GetAuthority($results->{details}->[0]->{authid}); |
777 |
|
777 |
|
778 |
is( $authority->field('150')->as_string(), |
778 |
is( $authority->field('150')->as_string(), |
779 |
"Beach city Weirdness Fiction Books 21st Century Fish Stew Pizza", |
779 |
"Beach city Weirdness Fiction Books 21st Century Fish Stew Pizza", |
Lines 800-812
subtest "LinkBibHeadingsToAuthorities record generation tests" => sub {
Link Here
|
800 |
"The generated record contains the correct subfields" |
800 |
"The generated record contains the correct subfields" |
801 |
); |
801 |
); |
802 |
|
802 |
|
803 |
# The same exemple With verbose |
803 |
# The same example With verbose |
804 |
( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); |
804 |
( $num_headings_changed, $results ) = LinkBibHeadingsToAuthorities($linker, $record, "",undef, 1); |
805 |
is( $num_headings_changed, 1, 'We changed the one we passed' ); |
805 |
is( $num_headings_changed, 1, 'We changed the one we passed' ); |
806 |
is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); |
806 |
is( $results->{details}->[0]->{status}, 'CREATED', "We added an authority record for the heading using verbose"); |
807 |
|
807 |
|
808 |
# Now we check the authority record itself |
808 |
# Now we check the authority record itself |
809 |
my $authority = GetAuthority($results->{details}->[0]->{authid}); |
809 |
$authority = GetAuthority($results->{details}->[0]->{authid}); |
810 |
is( $authority->field('100')->as_string(), |
810 |
is( $authority->field('100')->as_string(), |
811 |
"Tolkien, J. R. R. (John Ronald Reuel), 1892-1973. Lord of the rings", |
811 |
"Tolkien, J. R. R. (John Ronald Reuel), 1892-1973. Lord of the rings", |
812 |
"The generated record contains the correct subfields" |
812 |
"The generated record contains the correct subfields" |
813 |
- |
|
|