Skip to content

Commit

Permalink
Hotpatch to automated test framework
Browse files Browse the repository at this point in the history
  • Loading branch information
spgarbet committed Dec 11, 2024
1 parent a0d402c commit e8351ad
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
context("redcapConnection Argument Validation")

API_KEY <- rcon$token
url <- rcon$url # Should not be required but it is

#####################################################################
# Argument Validation ####
Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-020-redcapConnection-Functionality.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ API_KEY <-
keyring::key_get('redcapAPI', testdb, 'API_KEYs')
}

url <- rcon$url # Should not be required but it is


test_that("redcapApiConnection can be created",
expect_class(
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-024-unlockREDCap.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ context("unlockREDCap")
library(mockery)
library(curl)

url <- rcon$url # Should not be required but it is


h <- new_handle(timeout = 1L)
redirect <- structure(
list(url = "https://test.xyz/api/",
Expand Down
3 changes: 3 additions & 0 deletions tests/testthat/test-050-makeApiCall.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ context("makeApiCall Argument Validation")
library(mockery)
library(curl)

url <- rcon$url # Should not be required but it is


# Note: This file will only test that arguments fail appropriately, or
# that submethods perform as expected. the makeApiCall function
# is ubiquitous throughout the package. If we break it, it's bound
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
context("Export Typed Records Offline Functionality")

url <- rcon$url # Should not be required but it is

load(file.path(test_path("testdata"), "RedcapProject_test_redcapAPI.Rdata"))

suppressWarnings({
Expand Down

0 comments on commit e8351ad

Please sign in to comment.