tests/testthat/test_history.R

context("Testing History functionality")

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

  key = "ba435151893f4b833c9b27ca6f28044f"
  res = weatherstack_historical(key, "Vancouver", "2015-01-02", 'Celcius')

  expect_equal(res[6], 'Canada')
  expect_equal(res[7], 'British Columbia')

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