Skip to content

Commit

Permalink
update test-utils again for gh runners
Browse files Browse the repository at this point in the history
  • Loading branch information
mpadge committed Aug 27, 2024
1 parent fe48990 commit 092db57
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: roreviewapi
Title: Plumber API to report package structure and function
Version: 0.1.0.043
Version: 0.1.0.044
Authors@R:
person("Mark", "Padgham", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0003-2172-5265"))
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"codeRepository": "https://github.com/ropensci-review-tools/roreviewapi",
"issueTracker": "https://github.com/ropensci-review-tools/roreviewapi/issues",
"license": "https://spdx.org/licenses/GPL-3.0",
"version": "0.1.0.043",
"version": "0.1.0.044",
"programmingLanguage": {
"@type": "ComputerLanguage",
"name": "R",
Expand Down
11 changes: 3 additions & 8 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ test_that ("utils symbols", {
test_that ("utils gh user", {
g <- get_github_user ()
expect_type (g, "character")
is_local <- identical (Sys.getenv ("MPADGE_LOCAL"), "true")
# On GH, 'get_github_user()' returns 'char(0)':
expect_length (g, as.integer (is_local))
expect_length (g, 1L)

is_local <- identical (Sys.getenv ("MPADGE_LOCAL"), "true")
is_auth <- is_user_authorized ()
if (is_local) {
expect_equal (is_user_authorized (), is_auth)
} else {
expect_length (is_auth, 0L)
}
expect_equal (is_user_authorized (), is_auth)
})

test_that ("utils gh branch", {
Expand Down

0 comments on commit 092db57

Please sign in to comment.