Skip to content

Commit

Permalink
fix: update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vedhav committed Nov 8, 2023
1 parent 9e93d4b commit 091efb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-module_nested_tabs.R
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ testthat::test_that(".datasets_to_data returns tdata object", {

# join_keys
testthat::expect_equal(
get_join_keys(data),
join_keys(data),
teal.data::join_keys(teal.data::join_key("d1", "d2", c("pk" = "id")))
)

Expand Down
8 changes: 4 additions & 4 deletions tests/testthat/test-tdata.R
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,12 @@ testthat::test_that("tdata2env throws error if argument is not tdata", {
})

# ---- get_join_keys ----
testthat::test_that("get_join_keys returns NULL if no JoinKeys object exists inside tdata", {
testthat::test_that("join_keys returns NULL if no JoinKeys object exists inside tdata", {
my_tdata <- new_tdata(data = list(iris = iris, mae = reactive(miniACC)))
testthat::expect_null(get_join_keys(my_tdata))
testthat::expect_null(join_keys(my_tdata))
})

testthat::test_that("get_join_keys returns JoinKeys object if it exists inside tdata", {
testthat::test_that("join_keys returns JoinKeys object if it exists inside tdata", {
jk <- teal.data::join_keys(teal.data::join_key("A", "B", c("id" = "fk")))

my_tdata <- new_tdata(
Expand All @@ -216,5 +216,5 @@ testthat::test_that("get_join_keys returns JoinKeys object if it exists inside t
join_keys = jk
)

testthat::expect_equal(get_join_keys(my_tdata), jk)
testthat::expect_equal(join_keys(my_tdata), jk)
})

0 comments on commit 091efb1

Please sign in to comment.