library(dplyr) library(stringr) test_that("no one voted for themselves", { x <- vote_history |> filter(castaway == vote) expect_equal(nrow(x), 0) }) test_that("Castaway details is unique", { nrows <- nrow(castaway_details) distinct_rows <- castaway_details |> distinct(castaway_id) |> nrow() expect_equal(nrows, distinct_rows) }) test_that("Correct split votes", { x <- vote_history |> filter(!is.na(split_vote), !str_detect(split_vote, vote)) |> nrow() expect_equal(x, 0) })