tests/testthat/test_unique_pairs.R

library(testthat)
library(tibble)

context("unique_pairs")

test.notes <- tibble(taker_name = c("Kevin", "Kim", "Nicole", "Sandra"),
                     with_name = c(rep("Sandra", 3), "Nicole"))

#' Number of unique conversations to be 3 --
#' Nicole and Sandra both left notes on their one
#' conversation so we want to only count that once

test_that("Unique count as expected", {
  expect_equal(nrow(uniqueConversationPairs(test.notes)), 3)
})
laurenrenaud/surjR documentation built on Dec. 21, 2021, 9:42 a.m.