context("running company_details")
with_mock_api({
test_that("running", {
expect_error(company_details("BAD"))
res <- company_details("AAPL")
expect_is(res, "list")
expect_length(res, 2)
})
test_that("type filtering", {
# Test with before to avoid new filings.
res <- company_details("AAPL", type = "10-K", before = "20170801")
expect_equal(nrow(res$filings[1]), 25)
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.