Skip to content

Commit 5605198

Browse files
committed
Fixed use of Danger function in testing
1 parent 3369b38 commit 5605198

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tests/testthat/test-smk_dgr-ds.asCharacter.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@ test_that("setup", {
3030
# context("ds.asCharacter::smk_dgr::simple test")
3131
test_that("simple test", {
3232
res <- ds.asCharacter("D$LAB_TSC")
33+
expect_equal(length(res), 0)
3334

34-
expect_equal(length(res), 2)
35-
expect_equal(res$is.object.created, "A data object <ascharacter.newobj> has been created in all specified data sources")
36-
expect_equal(res$validity.check, "<ascharacter.newobj> appears valid in all sources")
35+
newobj <- ds.DANGERvarsEXTRACT('ascharacter.newobj')
36+
37+
expect_equal(length(newobj), 2)
38+
expect_true(all(c("list") %in% class(newobj[[1]])))
39+
expect_true(all(c("data.frame") %in% class(newobj[[2]])))
3740
})
3841

3942
#

0 commit comments

Comments
 (0)