context("test-r-simdata")
test_that("simData() is equal to the output that should be created", {
df <- simData(1, 1)
expect_equal(dim(df), c(16, 7))
expect_equal(class(df$date), "Date")
expect_equivalent(df$workoutName[1], as.factor("Full Body - A"))
expect_equal(
names(df),
c(
"date",
"workoutName",
"exerciseName",
"reps",
"weightKg",
"weightLb",
"notes"
)
)
})
test_that("checkHSclass checks a dataframe for class HS.data.frame", {
df <- simData()
expect_equal(class(df)[1], "data.frame")
expect_equal(class(df)[2], "HS.data.frame")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.