context("print and summary methods") skip_on_cran() vcr::use_cassette("print_methods", { res <- occ(query = 'Accipiter striatus', from = 'gbif', limit = 3) }, preserve_exact_body_bytes = TRUE) test_that("print.occdat", { expect_output(print(res), "Searched: gbif") expect_output(print(res), "Occurrences - Found:") expect_output(print(res), "Search type: Scientific") expect_output(print(res), "gbif: Accipiter striatus \\(3\\)") }) test_that("print.occdatind", { expect_output(print(res$gbif), "Species \\[Accipiter striatus \\(3\\)\\]") expect_output(print(res$gbif), "First 10 rows of \\[Accipiter_striatus\\]") expect_output(print(res$gbif), "A tibble") expect_output(print(res$gbif), "name") # empty results expect_output(print(res$obis), "First 10 rows of \\[Accipiter_striatus\\]") expect_output(print(res$obis), "A tibble") }) test_that("summary.occdat", { expect_output(print(summary(res)), " gbif") expect_output(print(summary(res)), "