Skip to content

Commit

Permalink
even more coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
gergness committed May 10, 2021
1 parent e0574a8 commit 7b677e7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-automation.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,17 @@ with_mock_crunch({
)
})

test_that("Get message on success when dry_run is TRUE", {
with_POST(
"", # Don't actually need to load anything, just need no POST error
expect_message(
runCrunchAutomation(ds, "# no commands", dry_run = TRUE),
"Script dry run was successful"
)
)

})

test_that("error truncation works", {
expected <- " - (line 1) Error 1\n - (line 2) Error 2\n - ... (Showing first 2 of 3 errors)"
attr(expected, "truncated") <- TRUE
Expand Down

0 comments on commit 7b677e7

Please sign in to comment.