testthat::context("Data counts")
httptest::with_mock_api({
test_that("Only correct resource names are accepted", {
# This should raise an error
expect_error(get_data_count("foobar"))
})
test_that("Correct counts are returned", {
# resource = "avoin_yliopisto"
expect_equal(get_data_count("avoin_yliopisto"), 342)
})
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.