tests/testthat/test-GetRateSummary.R

context('GetRateSummary')

test_that("'getURL' errors are handled gracefully", {
    set_zillow_web_service_id('ZWSID')

    with_mock(
        getURL = function(...) {stop('Cryptic getURL error')},
        expect_error(GetRateSummary(), "Zillow API call with request '.+' failed with Error in RCurl::getURL\\(request\\): Cryptic getURL error"),
        .env = 'RCurl'
    )
})
fascinatingfingers/ZillowR documentation built on June 5, 2019, 9:27 a.m.