tests/testthat/test_instructions.R

context("route")

test_that("extract instructions", {
  # Prepare
  route <- readRDS("data/route-data.rds")

  # Act
  instructions <- gh_instructions(route, instructions_only = TRUE)

  # Assert
  expect_is(instructions, "data.frame")
  expect_true(all(c("gh_start_id", "gh_end_id", "text") %in% names(instructions)))
})
crazycapivara/graphhopper-r documentation built on July 19, 2021, 1:16 p.m.