-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
skip scopus and springer tests if no key is set
- Loading branch information
1 parent
1a44a8a
commit e524968
Showing
2 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
test_that("scopus finds single known doi", { | ||
skip_on_cran() | ||
|
||
# Pull single test doi citation from test-citations.csv | ||
test_cit <- get_test_doi("scopus") | ||
|
||
# Search for single test doi using citation_search_springer() function | ||
scopus_res <- | ||
citation_test_doi("scopus") # Need to key API keys in order for this to work | ||
|
||
if (!is.null(scopus_res)) { | ||
expect_true(test_cit$pub_id %in% scopus_res$article_id) | ||
} | ||
skip_on_cran() | ||
|
||
key <- scythe_get_key("scopus") | ||
|
||
if (is.na(key)){ | ||
skip() | ||
message("No Scopus key set. Skipping.") | ||
} | ||
|
||
|
||
# Pull single test doi citation from test-citations.csv | ||
test_cit <- get_test_doi("scopus") | ||
|
||
# Search for single test doi using citation_search_springer() function | ||
scopus_res <- | ||
citation_test_doi("scopus") # Need to key API keys in order for this to work | ||
|
||
if (!is.null(scopus_res)) { | ||
expect_true(test_cit$pub_id %in% scopus_res$article_id) | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters