tests/testthat/test-is_question_viewed.R

library (surveyreader)
library(testthat)
context("SurveyMonkey multiple choice metavariables non-missingness.")

test_that("correct conversion takes place", {
  expect_equal( is_question_viewed (column = c(
    "Viewed", NA, "Any characters",NA, NA),
     na_value = 0 ),
    c(1,0,1,0,0)
  )
})
antaldaniel/surveyreader documentation built on May 16, 2019, 2:29 a.m.