# Get test data
db_action <- rarr::db_action
# Wrangle action
action <- wrangle_action(db_action)
test_that("check output data format", {
expect_true(is.data.frame(action))
expect_true("action_no" %in% colnames(action))
expect_true("action_no_link" %in% colnames(action))
expect_true("start_date" %in% colnames(action))
expect_true("end_date" %in% colnames(action))
expect_true("poc_review_date" %in% colnames(action))
expect_true("eng_level" %in% colnames(action))
expect_true("level_date" %in% colnames(action))
expect_true("last_edited_date" %in% colnames(action))
expect_true("id_type" %in% colnames(action))
})
test_that("check errors", {
expect_error(wrangle_action("a"))
expect_error(wrangle_action(18))
expect_error(wrangle_action(data.frame()))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.