tests/testthat/test-function-iso_to_localtime.R

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

test_that("isoToLocaltime() works", {

  expect_error(
    kwb.datetime::isoToLocaltime(timestamps = 1)
    # timestamps are expected to be of mode character
  )
   expect_error(
    kwb.datetime::isoToLocaltime(timestamps = "a")
    # Not all timestamps are in the expected format
# "yyyy-mm-dd HH:MM:SS+[01|02]", i.e. ending either in
#   "+01" (UTC offset in winter) or
#   "+02" (UTC offset in summer)!
  )

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