tests/testthat/test_company_information.R

context("running company_information")

with_mock_api({
test_that("running ", {
            expect_error(company_information("BAD"))
            res <- company_information("EA")
            expect_is(res, "data.frame")

            expect_length(res, 19)
            expect_length(rownames(res), 1)

            expect_equal(res$name, "ELECTRONIC ARTS INC.")
})
})

Try the edgarWebR package in your browser

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

edgarWebR documentation built on April 24, 2021, 5:09 p.m.