tests/testthat/test_latest_flights_date.R

context("latest_flights_date")

# skip tests because they take too much time
skip_if(Sys.getenv("TEST_ONE") != "")
testthat::skip_on_cran()


# latest_flights_date -----------------------

test_that("latest_flights_date", {

  dates1 <- latest_flights_date()

  testthat::expect_true(class(latest_flights_date()) == "numeric")
  testthat::expect_true(length(dates1) > 0)
  testthat::expect_error(latest_flights_date(999))
})

Try the flightsbr package in your browser

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

flightsbr documentation built on June 8, 2025, 1:17 p.m.