Skip to content

Commit

Permalink
Checks for missingness #139
Browse files Browse the repository at this point in the history
  • Loading branch information
fontikar committed Dec 19, 2024
1 parent bcd2b4e commit e7a3afe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/extract_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
#' }
extract_data <- function(database, table = NA, col, col_value) {

# Check missingness
check_arg_missingness(database, col, col_value)

# Check compatability
status <- check_compatibility(database, single_table_allowed = TRUE)

Expand Down
2 changes: 2 additions & 0 deletions tests/testthat/test-extract_.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ taxon_name = "Banskia serrata"

test_that("Error message is triggered", {
expect_error(austraits_5.0.0_lite %>% extract_taxa())
expect_error(extract_taxa())
expect_error(extract_data(at_six))
})

test_extract_error <- function(austraits){
Expand Down

0 comments on commit e7a3afe

Please sign in to comment.