Skip to content

Commit f78435b

Browse files
committed
Merge branch 'main' of github.com:gesistsa/rtoot
2 parents 5060280 + 76a24e8 commit f78435b

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

tests/testthat/test-auth_verify.R

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
test_that("verify_envvar (Good case)", {
22
## The cassette was created with a valid envvar
3+
## But here is a fake
4+
withr::local_envvar(
5+
RTOOT_DEFAULT_TOKEN = paste0(
6+
paste0(rep("a", 43), collapse = ""),
7+
";user;fosstodon.org"
8+
)
9+
)
310
vcr::use_cassette("envvar", {
4-
expect_error(capture_message(verify_envvar()), NA)
11+
expect_error(x <- capture_message(verify_envvar()), NA)
512
})
13+
expect_false("simpleError" %in% class(x))
614
})
715

816
test_that("verify_envvar (Good case), silent", {
917
## The cassette was created with a valid envvar
10-
skip_on_ci()
11-
skip_on_cran()
18+
withr::local_envvar(
19+
RTOOT_DEFAULT_TOKEN = paste0(
20+
paste0(rep("a", 43), collapse = ""),
21+
";user;fosstodon.org"
22+
)
23+
)
1224
vcr::use_cassette("envvar_silent", {
1325
expect_silent(verify_envvar(verbose = FALSE))
1426
})

tests/testthat/test-get_account_auth.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ test_that("get_account_lists", {
115115

116116
test_that("get_account_relationships", {
117117
vcr::use_cassette("get_account_relationships_default", {
118-
x <- get_account_relationships(id = id, token = fake_token)
118+
x <- get_account_relationships(ids = id, token = fake_token)
119119
})
120120
expect_true("tbl_df" %in% class(x))
121121
})

0 commit comments

Comments
 (0)