tests/testthat/test_API.R

library(API)
library(testthat)
context("latlong")




test_that("output is correct", {
  place <- "Tehran"
 w <<- "AIzaSyAGdetT_wO2o2Q6LfHFVmEw7yxFnvVpCbo"
 t <- latlong(place,w)
latlong()
 
 expect_equal(t$`latitude and longitude`$lat , 35.6892)

  })
pedism/5 documentation built on May 8, 2019, 12:57 p.m.