tests/testthat/test-function-toTimezone.R

#
# This test file has been generated by kwb.test::create_test_files()
#

test_that("toTimezone() works", {

  kwb.datetime:::toTimezone(x = as.POSIXct("2018-06-03 23:50:00"), tz = "a")
   expect_error(
    kwb.datetime:::toTimezone(x = 1, tz = 1)
    # inherits(x, "POSIXt") is not TRUE
  )
   expect_error(
    kwb.datetime:::toTimezone(x = as.POSIXct("2018-06-03 23:50:00"), tz = 1)
    # invalid 'tz' value
  )

})
KWB-R/kwb.datetime documentation built on July 9, 2021, 10:28 p.m.