Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelmcd18 committed Jul 11, 2024
1 parent 9c17b7e commit c321631
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions man/review-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions tests/testthat/test-renderQCReport.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
if (Sys.getenv("METWORX_VERSION") != "") {

create_test_svn()

logAssign("script/model-management.R")
logAccept("script/box-sample-code.R")

test_that("renderQCReport works with valid directory", {

renderQCReport(.output_dir = logRoot())

# Check that the output file was created
expect_true(file.exists(file.path(logRoot(), paste0("qc-report-", Sys.Date(), ".pdf"))))

})
}
3 changes: 3 additions & 0 deletions tests/testthat/test-renderQCSummary.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ if (Sys.getenv("METWORX_VERSION") != "") {

create_test_svn()

logAssign("script/model-management.R")
logAccept("script/box-sample-code.R")

test_that("renderQCSummary works with valid directory", {

expect_message({
Expand Down

0 comments on commit c321631

Please sign in to comment.