tests/testthat/test-download_transect_list.R

test_that("download_transect_list works", {

  expect_equal(length(suppressMessages(download_transect_list(-2))), 0)

  expect_message(download_transect_list(1, id == "hi"))

  two_transects <- suppressMessages(download_transect_list(1, id == 6570 | id == 6322))

  if (length(two_transects) !=0){
    expect_equal(class(two_transects), "list")
    expect_equal(length(two_transects), 2)
    expect_equal(class(two_transects[[1]]), c("tbl_df",
                                              "tbl",
                                              "data.frame"))
    expect_equal(ncol(two_transects[[1]]), 14)
  }
})

Try the fqar package in your browser

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

fqar documentation built on June 22, 2025, 1:06 a.m.