File: test-cursorMark.R

package info (click to toggle)
r-cran-solrium 1.1.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,132 kB
  • sloc: xml: 374; sh: 13; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
context("cursorMark")

test_that("solr_search and cursorMark", {
  skip_on_cran()

  # no nextCursorMark exists when user doesn't ask for it
  b <- conn_plos$search(params = list(q='*:*', rows=2))
  expect_null(attr(b, "nextCursorMark"))

  # nextCursorMark exists when user gives cursorMark as a param
  a <- conn_plos$search(params = 
    list(q='*:*', rows=100, sort='id asc', cursorMark = "*"))
  expect_is(attr(a, "nextCursorMark"), "character")
  
  # cursor works for another request
  d <- conn_plos$search(params = 
    list(q='*:*', rows=100, sort='id asc', 
      cursorMark = attr(a, "nextCursorMark")))
  expect_is(attr(d, "nextCursorMark"), "character")
})