tests/testthat/test-role_dimension.R

context("test role_dimension")

test_that("role_dimension works", {
  d <- role_dimension(st_mrs_age_test$dimension$where, "test")
  res <-
    structure(
      list(
        where_key = logical(0),
        region = logical(0),
        state = logical(0),
        city = logical(0)
      ),
      row.names = integer(0),
      class = c("tbl_df",
                "tbl", "data.frame", "dimension_table"),
      name = "where",
      type = "role",
      role_playing = "test"
    )
  expect_equal(d, res)
})

Try the starschemar package in your browser

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

starschemar documentation built on Nov. 11, 2023, 5:09 p.m.