tests/testthat/test-zzz-commands-connection.R

context("commands - connection")

test_that("AUTH", {
  pw <- rand_str()
  expect_equal(redis_cmds$AUTH(pw), list("AUTH", pw))
})

test_that("ECHO", {
  str <- rand_str()
  expect_equal(redis_cmds$ECHO(str), list("ECHO", str))
})

test_that("PING", {
  expect_equal(redis_cmds$PING(), list("PING", NULL))
})

test_that("QUIT", {
  expect_equal(redis_cmds$QUIT(), list("QUIT"))
})

test_that("SELECT", {
  expect_equal(redis_cmds$SELECT(1), list("SELECT", 1))
})

Try the redux package in your browser

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

redux documentation built on May 29, 2024, 6:15 a.m.