context("test-results_get.R")
test_that("api retrieves and munges correct data", {
httptest::with_mock_API({
df <- results_get("test_20180824", county="04013")
expect_equal(nrow(df), 429)
expect_equal(sum(df$votes), 156065)
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.