Skip to content

Commit af7946d

Browse files
Copilotrix133
andcommitted
Add comprehensive tests for hierarchy warning edge cases
Co-authored-by: rix133 <[email protected]>
1 parent 2092d0c commit af7946d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/testthat/test-combineRDBESDataObjects.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,15 @@ test_that("combineRDBESDataObjects does not warn when combining objects from sam
6666
NA)
6767
})
6868

69+
test_that("combineRDBESDataObjects does not warn when one object has no DE table", {
70+
71+
myObject1 <- importRDBESDataCSV(rdbesExtractPath = "./h1_v_20250211")
72+
myObject2 <- createRDBESDataObject() # Empty object with no DE
73+
74+
# Expect no warning because one object has no hierarchy
75+
expect_warning(combineRDBESDataObjects(RDBESDataObject1=myObject1,
76+
RDBESDataObject2=myObject2),
77+
NA)
78+
})
79+
6980
}) ## end capture.output

0 commit comments

Comments
 (0)