tests/testthat/test-render_report.R

# context("test-render_report")
# 
# # Generate TB month report
# render_report(report_name = "tb_month", 
#               output_dir = ".",
#               params = list(reporting_month = 1,
#                             reporting_year = 2018),
#               quiet = TRUE)
# 
# # Assess whether report was generated
# if (file.exists("./tb_month.html")) {
#   invisible(file.remove("./tb_month.html"))
#   result <- TRUE
# } else {
#   result <- FALSE
# }
# 
# test_that("tb_month report generated", {
#   expect_true(result)
# })
JayAchar/hisreportr documentation built on March 18, 2020, 5:57 a.m.