tests/testthat/test-is_paginated.R

test_that("is not paginated", {
  expect_false(is_paginated(''))
  expect_false(is_paginated('{\n  \"id\": \"PGP000001\"\n }'))
})

test_that("is paginated", {
  txt <- '{
  "count": 6,
  "next": null,
  "previous": null
  }
'
  expect_true(is_paginated(txt))
})

Try the quincunx package in your browser

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

quincunx documentation built on July 9, 2023, 7:32 p.m.