Skip to content

Commit

Permalink
add test for new notification
Browse files Browse the repository at this point in the history
  • Loading branch information
sannegovaert committed Dec 18, 2024
1 parent 6223ac0 commit 7d2b245
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/testthat/test-merge_camtrapdp.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ test_that("merge_camtrapdp() returns a valid camtrapdp object", {
expect_no_error(check_camtrapdp(merge_camtrapdp(x, y)))
})

test_that("merge_camtrapdp() returns alert on non-identical samplingDesign", {
skip_if_offline()
x <- example_dataset()
x$name <- "x"
y <- x
y$name <- "y"
y$project$samplingDesign <- "opportunistic"

expect_message(
merge_camtrapdp(x, y),
class = "camtrapdp_alert_sampligndesign_ignored"
)
})

test_that("merge_camtrapdp() returns error on missing/invalid/duplicate dataset
name(s)", {
skip_if_offline()
Expand Down

0 comments on commit 7d2b245

Please sign in to comment.