tests/testthat/test.db.R

context("Db tests")
library(nhlscrape)
SetDbPath(example = TRUE)

test_that("We can connect to the database", {
  expect_equal(QueryDb("SELECT * FROM events WHERE game_id=2019020001")$result_event[1], "Game Scheduled")
})

Try the nhlscrape package in your browser

Any scripts or data that you put into this service are public.

nhlscrape documentation built on March 26, 2020, 5:29 p.m.