tests/testthat/test-get_med_list.R

with_mock_dir("get_med_list", {
  test_that("Returns data.frame", {
    med_list <- get_med_list()
    expect_true(is.data.frame(med_list))
  })

  test_that("Able to retrieve all 29 medications", {
    med_list <- get_med_list()
    expect_length(med_list$med_name, 29)
    expect_length(med_list$cf, 29)
  })
})

Try the mmequiv package in your browser

Any scripts or data that you put into this service are public.

mmequiv documentation built on June 8, 2025, 11:12 a.m.