tests/testthat/test_warns_on_incomplete_url.R

context("Errors and warns appropriately")


test_that("errors when url doesn't contain http or https", {
  url <- "https://github.com/hadley/vis-eda/blob/master/travel.R" %>% sub("https://", "", .)

  expect_error(
    rawr::github(url)
    ,

    "Invalid url - must start with https or http")
})

Try the rawr package in your browser

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

rawr documentation built on May 17, 2021, 5:07 p.m.