tests/testthat/test-phenotypes.R

# tests for phenotypes fxn in ropensnp
context("phenotypes")

test_that("phenotypes returns the correct class", {
  skip_on_cran()

  df <- suppressMessages(phenotypes(userid = "1,6,8", df = TRUE))

  expect_that(df, is_a("list"))
  expect_that(df[[1]], is_a("data.frame"))
  expect_equal(
    as.character(suppressMessages(phenotypes(userid = 1))$user$name),
    "Bastian Greshake Tzovaras"
  )
})
ropensci/rsnps documentation built on July 31, 2023, 11:11 a.m.