Nothing
test_that("Survey validation identifies missing IDs", {
s <- survey_df(
x = data.frame(x = 1:3),
identifier = "survey_1",
filename = "survey_1.rds"
)
attr(s, "id") <- NULL
expect_error(
validate_survey_list(list(s)),
"missing survey ID"
)
})
test_that("Survey validation identifies missing filenames", {
s <- survey_df(
x = data.frame(x = 1:3),
identifier = "survey_1",
filename = "survey_1.rds"
)
attr(s, "filename") <- NULL
expect_error(
validate_survey_list(list(s)),
"missing filename"
)
})
test_that("Survey validation rejects duplicate IDs", {
s1 <- survey_df(
x = data.frame(x = 1:3),
identifier = "survey_1",
filename = "survey_1.rds"
)
s2 <- survey_df(
x = data.frame(x = 4:6),
identifier = "survey_1",
filename = "survey_2.rds"
)
expect_error(
validate_survey_list(list(s1, s2)),
"not unique"
)
})
test_that("Survey validation accepts valid survey lists", {
s1 <- survey_df(
x = data.frame(x = 1:3),
identifier = "survey_1",
filename = "survey_1.rds"
)
s2 <- survey_df(
x = data.frame(x = 4:6),
identifier = "survey_2",
filename = "survey_2.rds"
)
expect_no_error(
validate_survey_list(list(s1, s2))
)
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.