tests/testthat/test-052-unitsFieldAnnotation.R

context("attributeAssignment Functionality")


test_that(
  "stripHTMLandUnicode Functionality", 
  {
    expect_equal(
      stripHTMLandUnicode("field_name", "<p>text\U00B5</p>", "annotation"), 
      "text"
    )
  }
)


test_that(
  "unitsFieldAnnotation Functionality", 
  {
    expect_equal(
      unitsFieldAnnotation("field", "label", "units={\"meters\"}"), 
      "meters"
    )
  }
)

Try the redcapAPI package in your browser

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

redcapAPI documentation built on Sept. 13, 2023, 1:07 a.m.