Nothing
with_mock_dir("search_meds", {
test_that("Returns data.frame", {
oxy_list <- search_meds("oxy")
expect_true(is.data.frame(oxy_list))
})
test_that("Able to retrieve all 6 medications with 'mcg' in the name", {
mcg <- search_meds("mcg")
expect_length(mcg$med_name, 6)
expect_length(mcg$cf, 6)
})
})
test_that("Provides correct error messages for invalid `med_name`", {
expect_snapshot(
error = TRUE,
search_meds(med_name = NULL)
)
expect_snapshot(
error = TRUE,
search_meds(med_name = NULL)
)
expect_snapshot(
error = TRUE,
search_meds(med_name = 1)
)
expect_snapshot(
error = TRUE,
search_meds(med_name = c("fent", "tram"))
)
})
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.