Skip to content

Commit

Permalink
Fix failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivia-Box-Power committed Nov 22, 2024
1 parent bbb11d5 commit f49e98d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/testthat/test-af_palette.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ test_that("Error if too many colours requested", {
})

test_that("Use `main2` if two colours required.", {
expect_warning(af_palette("main", palette_type = "af")(2))
expect_message(
af_palette("main", palette_type = "af")(2),
"Using `main2` palette as only two colours are required."
)
expect_equal(
suppressWarnings(af_palette("main", palette_type = "af")(2)),
suppressMessages(af_palette("main", palette_type = "af")(2)),
unname(af_colour_palettes$main2)
)
})

0 comments on commit f49e98d

Please sign in to comment.