Skip to content

Commit

Permalink
Test recovering pubmed ids
Browse files Browse the repository at this point in the history
  • Loading branch information
stitam committed Dec 22, 2024
1 parent ce3f924 commit 343d71c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/testthat/test-ncbi_recover_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ test_that("ncbi_recover_id() works with nuccore", {
id <- ncbi_recover_id(uid)
expect_equal(id,"OP617744.1")
})

test_that("ncbi_recover_id() works with pubmed", {
uid <- ncbi_get_uid(examples$pubmed, db = "pubmed")
id1 <- ncbi_recover_id(uid)
id2 <- ncbi_recover_id(uid$uid, db = "pubmed")
expect_equal(id1, c("39332413", "36759752"))
expect_equal(id1, c("39332413", "36759752"))
})

0 comments on commit 343d71c

Please sign in to comment.