Skip to content

Commit

Permalink
Pass the correct URL to the MARC21
Browse files Browse the repository at this point in the history
  • Loading branch information
melmothx committed Nov 18, 2023
1 parent 3fa7476 commit 1418a7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/AmuseWikiFarm/Schema/Result/OaiPmhRecord.pm
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,7 @@ sub marc21_record {
my $dc = $obj->dublin_core_entry;
my %rec = (
%$dc,
full_uri => [ $base_url . $obj->full_uri ],
identifier => [ $base_url . $self->identifier ],
full_uri => [ $base_url . $self->identifier ],
format => [ $self->metadata_format ],
type => [ $self->metadata_type ],
);
Expand Down
4 changes: 2 additions & 2 deletions t/annotations.t
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ ok path($site->repo_root, 'annotations', '.gitignore')->exists;
$as->annotation_id => { value => 'YY/X' },
});
$mech->get('/oai-pmh?verb=GetRecord&metadataPrefix=marc21&identifier=oai:0annotate0.amusewiki.org:' .
$title->full_uri);
$title->full_uri . '.epub');
my $xml = $mech->content;
# author with indicator for first last or last first
like $xml, qr{tag="100" ind1="0" ind2=" ">\s*<subfield code="a">Author one}s;
Expand All @@ -291,7 +291,7 @@ ok path($site->repo_root, 'annotations', '.gitignore')->exists;
# slc
like $xml, qr{tag="852" ind1=" " ind2=" ">\s*<subfield code="c">YY/X}s;
# uri
like $xml, qr{tag="856" ind1=" " ind2=" ">\s*<subfield code="u">https://0annotate0.amusewiki.org/library/}s;
like $xml, qr{tag="856" ind1=" " ind2=" ">\s*<subfield code="u">https://0annotate0.amusewiki.org/library/.*\.epub</subfield>\s*<subfield code="q">application/epub\+zip</subfield>}s;
# sku
like $xml, qr{tag="024" ind1="8" ind2=" ">\s*<subfield code="a">bib123}s;
like $xml, qr{These are the notes}, "HTML cleaned";
Expand Down

0 comments on commit 1418a7e

Please sign in to comment.