tests/testthat/test-pullSpeciesCodes.R

context("pullSpeciesCodes and RefSpecies load and function correctly")

test_that("pullSpeciesCodes finds a number correctly", {
  expect_equal(pullSpeciesCodes("ABCO"), 15)
  })

test_that("pullSpeciesCodes stops if nothing was found", {
  expect_error(pullSpeciesCodes("ABXY", RefSpecies))
})
ecology-rocks/MakeMyForests documentation built on May 15, 2019, 7:57 p.m.