Skip to content

Commit fa8b4ca

Browse files
committed
Fix tests for ORCID asset
1 parent 1c2bc3d commit fa8b4ca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/testthat/test-build_citation.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ test_that("parse_authors returns correct HTML for multiple authors and affiliati
1111
)
1212
env <- parse_authors(authors)
1313
expect_type(env, "environment")
14-
expect_match(env$html_authors[1], "Jane Doe<span class='author-info'> <a href='https://orcid.org/0000-0001-2345-6789' target='_blank'><sup><img src='assets/images/orcid_icon.png' height='12' width='12'/></sup></a></span>")
15-
expect_match(env$html_authors[2], "Doc Brown<span class='author-info'> <a href='#aff1'><sup>1</sup></a> <a href='https://orcid.org/0000-0009-8765-4321' target='_blank'><sup><img src='assets/images/orcid_icon.png' height='12' width='12'/></sup></a></span>")
14+
expect_match(env$html_authors[1], "Jane Doe<span class='author-info'> <a href='https://orcid.org/0000-0001-2345-6789' target='_blank'><sup><img src='/assets/images/orcid_icon.png' height='12' width='12'/></sup></a></span>")
15+
expect_match(env$html_authors[2], "Doc Brown<span class='author-info'> <a href='#aff1'><sup>1</sup></a> <a href='https://orcid.org/0000-0009-8765-4321' target='_blank'><sup><img src='/assets/images/orcid_icon.png' height='12' width='12'/></sup></a></span>")
1616
expect_match(env$html_authors[3], "John Smith<span class='author-info'> <a href='#aff2'><sup>2</sup></a>")
1717
expect_match(paste(env$pre_authors, collapse=", "), "Doe J., Brown D., Smith J.", fixed = TRUE)
1818
expect_match(env$affiliations, "<p style='font-size=0.8em'>Affiliations:<br/><ol class='affiliations'><li id='aff1'>University A</li><li id='aff2'>University B</li></ol></p>")

0 commit comments

Comments
 (0)