test_that("rename_indicators() renames indicators from series IDs to indicators", {
# Clear any leftover environmental variables from earlier tests
Sys.unsetenv("R_DJPRLABOURDASH_TABLEDEST")
df <- rename_indicators(data = filter_dash_data(
series_ids = c(
"A84423354L",
"A84423242V",
"A84423466F",
"A84424691V",
"A84600079X",
"A84423350C",
"A84423349V",
"A84423357V",
"pt_emp_vic",
"A84423461V",
"A84423237A",
"A84424687C",
"A84423355R",
"A84423243W",
"A84423467J",
"A84424692W",
"A84426256L",
"A85223450L",
"A85223451R",
"A84423356T"
)
)
)
expect_s3_class(df, "data.frame")
expect_type(df$indicator, "character")
expect_true(all(nchar(df$indicator) >= 1))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.