From a859b88b806631e9098172c00cfebd4c6f5f7bcc Mon Sep 17 00:00:00 2001 From: chrisholbrook Date: Fri, 30 Aug 2024 09:19:21 -0400 Subject: [PATCH] fix dplyr namespace --- tests/testthat/test-glatos_animals.R | 30 ++-------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/tests/testthat/test-glatos_animals.R b/tests/testthat/test-glatos_animals.R index a6477f58..2dd0c2c5 100644 --- a/tests/testthat/test-glatos_animals.R +++ b/tests/testthat/test-glatos_animals.R @@ -122,24 +122,11 @@ test_that("validate_glatos_animals catches bad inputs", { fixed = TRUE ) - # # glatos_check_col_names - # expect_error( - # glatos_check_col_names( - # dplyr::rename(x, - # fish_name = animal_id, - # release_timestamp = utc_release_date_time - # ), - # req_cols - # ), - # regexp = "Required column(s) missing from input x", - # fixed = TRUE - # ) - # data.frame input; wrong column class expect_error( as_glatos_animals( - plyr::mutate(x, + dplyr::mutate(x, animal_id = as.integer(animal_id), utc_release_date_time = as.character(utc_release_date_time) ) @@ -148,20 +135,7 @@ test_that("validate_glatos_animals catches bad inputs", { fixed = TRUE ) - # # glatos_check_col_names - # expect_error( - # glatos_check_col_classes( - # plyr::mutate(x, - # animal_id = as.integer(animal_id), - # utc_release_date_time = as.character(utc_release_date_time) - # ), - # req_cols - # ), - # regexp = "The following column(s) have wrong class", - # fixed = TRUE - # ) - - + # non-data.frame input expect_error( as_glatos_animals(