tests/testthat/test_time_series.R

context("Testing History functionality")

test_that("Testing if history function gives correct output", {

  key = "ba435151893f4b833c9b27ca6f28044f"
  res = weatherstack_timeSeries(key,"New York","2015-01-21","2015-01-25")

  expect_equal(as.character(res[1,"date"]), "2015-01-21")
  expect_equal(as.integer(res[2,"avgtemp"]), 0)

})
Yuening-Li/weatherstack documentation built on Feb. 16, 2020, 5:42 a.m.