tests/testthat/test_eq_location_clean.R

context("location clean")

dat<-NOAA_quakes

test_that("location name cleaning works good",{
  
  res<-eq_location_clean(dat)
  
  expect_equal(res$LOCATION_NAME,
               res$LOCATION_NAME %>% stringr::str_to_lower() %>%
                 stringr::str_to_title())
  
  
  expect_s3_class(res,"tbl")
})
jyjek/jyjekNOAA documentation built on May 7, 2019, 10:52 p.m.