tests/testthat/test-api.R

context("api")

test_that("api returns consistent results", {
  skip_on_cran()

  ids <- c(234669 , 236610 , 236692)

  df <- get_education_data(
    level = "college-university",
    source = "ipeds",
    topic = "finance",
    filters = list(year = 2016, unitid = ids)
  )

  expect_equal(ids, unique(df$unitid))
})

Try the educationdata package in your browser

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

educationdata documentation built on Sept. 29, 2022, 5:11 p.m.