Skip to content

Commit 338ae82

Browse files
authored
Merge pull request #93 from ThinkR-open/att-config-test
test : Add test for att_amen_desc() errors message
2 parents feadc1d + cf9e9bf commit 338ae82

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/testthat/test-amend-description.R

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,15 @@ test_that("att_amend_desc can create, use and update config file", {
525525
desc_file <- readLines(file.path(dummypackage, "DESCRIPTION"))
526526
expect_equal(desc_file[grep("Suggests: ", desc_file) + 1], " ggplot2,")
527527

528+
# error when trying to use and update config at the same time
529+
expect_error(
530+
object =att_amend_desc(
531+
path = dummypackage,
532+
use.config = TRUE,
533+
update.config = TRUE),
534+
regexp = "Cannot use and update config at the same time"
535+
)
536+
528537
# Clean after
529538
unlink(dummypackage, recursive = TRUE)
530539
})

0 commit comments

Comments
 (0)