tests/testthat/test-upload.R

with_mock_dir("t/upload_f", {
  test_that("`ps_upload_file()` works", {
    file <- system.file('extdata/null-plan-incumbency.geojson', package = 'planscorer')
    out <- ps_upload_file(file)
    expect_length(out, 2)
    expect_equal(class(out), 'list')
    expect_in(names(out), c('index_url', 'plan_url'))
  })
})

Try the planscorer package in your browser

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

planscorer documentation built on Sept. 24, 2024, 5:08 p.m.