tests/testthat/test-geogendivr.R

context('prepare_bold_res')

test_that("data frame check fishbase name BOLD with correct number of features is returned", {
    require(tidyverse)
    require(rfishbase)
    data(requestPomacanthidaeBOLD)
    prparedResBold <- prepare_bold_res(resBold,
                                       marker_code="COI-5P",
                                       species_names=TRUE, 
                                       coordinates=TRUE, 
                                       ambiguities=TRUE, 
                                       min_length=420,
                                       max_length=720
                                      )
    res <- dim(prparedResBold)[2]
    expect_equal(res, 80)
})
Grelot/geogendivr documentation built on Sept. 3, 2020, 6:25 p.m.