tests/testthat/test_scrape_text.R

context("scrape_text")
library(tmutilsr)

test_that("text retrieved", {
    expect_true(is.na(scrape_text("https://www.nytimes.com/2018/02/10/watching/homeland-season-7-premiere-catchup-what-you-need-to-know.html", ".evys1bk0")))
    expect_false(is.na(scrape_text("https://www.nytimes.com/2018/02/10/watching/homeland-season-7-premiere-catchup-what-you-need-to-know.html", "p")))

})
doritge/tmutilsr documentation built on Feb. 2, 2020, 7:47 p.m.