# Generated by fusen: do not edit by hand
test_that("business_logic works", {
business_logic <- BusinessLogic$new()
business_logic$generate_results("Endeavor Air", 1, "arr_delay", 30)
expect_s3_class(business_logic, "R6")
expect_s3_class(business_logic, "BusinessLogic")
expect_identical(business_logic$data, nycflights13::flights)
expect_identical(business_logic$results$title,
"January: Endeavor Air")
expect_identical(business_logic$results$text,
"In January Endeavor Air had 16 days with arrivals delayed by more than 30 minutes.")
vdiffr::expect_doppelganger("Results chart 1", business_logic$results$chart)
business_logic$generate_results("United Air Lines", 7, "dep_delay", 12)
expect_identical(business_logic$results$text,
"In July United Air Lines had 30 days with departures delayed by more than 12 minutes.")
vdiffr::expect_doppelganger("Results chart 2", business_logic$results$chart)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.