Skip to content

Commit

Permalink
Update tests, no longer nonrepeats with single instance repeat
Browse files Browse the repository at this point in the history
TODO: Check if true, but beleive this is no longer needed now that we've redefined redcap_form_instance/redcap_event_instance
  • Loading branch information
rsh52 committed Sep 20, 2024
1 parent 3ce0e12 commit 374ad48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/testthat/test-clean_redcap_long.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ test_that("clean_redcap_long with mixed structure works", {
# Check redcap_data contents for mixed and nonrepeating structure
expected_mixed_data <- tibble::tribble(
~record_id, ~redcap_event, ~redcap_form_instance, ~mixed_structure_1, ~form_status_complete,
1, "event_1", 1, "Mixed Nonrepeat 1", 0,
1, "event_1", NA, "Mixed Nonrepeat 1", 0,
1, "event_2", 1, "Mixed Repeat 1", 0,
1, "event_2", 2, "Mixed Repeat 2", 0
)
Expand Down Expand Up @@ -309,7 +309,7 @@ test_that("convert_mixed_instrument works", {
expected_out <- tibble::tribble(
~record_id, ~redcap_repeat_instrument, ~redcap_repeat_instance, ~mixed_structure_variable,
~repeat_form_variable, ~mixed_repeat_var,
1, "mixed_structure_form", 1, "A", NA, NA,
1, "mixed_structure_form", NA, "A", NA, NA,
2, "mixed_structure_form", 1, "B", NA, NA,
3, "repeat_form", 1, NA, "C", NA,
4, "repeat_form", 2, NA, "D", NA,
Expand Down

0 comments on commit 374ad48

Please sign in to comment.