Skip to content

Commit

Permalink
Use mica_dup instead of mica_duplicates
Browse files Browse the repository at this point in the history
  • Loading branch information
damianooldoni committed Nov 9, 2023
1 parent fc60b6f commit f37ef07
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions tests/testthat/test-get_record_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,15 @@ test_that(paste(
"removeDuplicateRecords allows removing duplicates,",
"but structure output remains the same"
), {
mica_duplicates <- mica
mica_duplicates$data$observations$sequenceID <- mica_duplicates$data$observations$sequenceID[1]
mica_duplicates$data$observations$deploymentID <- mica_duplicates$data$observations$deploymentID[1]
mica_duplicates$data$observations$timestamp <- mica_duplicates$data$observations$timestamp[1]
mica_duplicates$data$observations$scientificName <- "Anas strepera"
rec_table <- get_record_table(mica_duplicates)
rec_table_dup <- get_record_table(mica_duplicates,
mica_dup <- mica
# create duplicates at 2020-07-29 05:46:48, location: B_DL_val 5_beek kleine vijver
mica_dup$data$observations[,"sequenceID"] <- mica_dup$data$observations$sequenceID[3]
mica_dup$data$observations[, "deploymentID"] <- mica_dup$data$observations$deploymentID[3]
mica_dup$data$observations[, "timestamp"] <- mica_dup$data$observations$timestamp[3]
mica_dup$data$observations[, "scientificName"] <- mica_dup$data$observations$scientificName[3]

rec_table <- get_record_table(mica_dup)
rec_table_dup <- get_record_table(mica_dup,
removeDuplicateRecords = FALSE
)
testthat::expect_equal(nrow(rec_table), 1)
Expand Down

0 comments on commit f37ef07

Please sign in to comment.