From f32093c662aea56f23ba8d2605552f8c08d33345 Mon Sep 17 00:00:00 2001 From: Kodor Date: Sat, 1 Aug 2026 21:29:44 -0400 Subject: [PATCH] fix(test): update theme tests for paper_bg=FALSE default (#19) --- tests/testthat/test_theme.R | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/testthat/test_theme.R b/tests/testthat/test_theme.R index 720f8a7..76e3fd0 100644 --- a/tests/testthat/test_theme.R +++ b/tests/testthat/test_theme.R @@ -133,8 +133,13 @@ test_that("theme_civilytics uses brand ink color for text", { expect_equal(th$text$colour, unname(civilytics_colors["ink"])) }) -test_that("theme_civilytics uses brand paper color for plot background", { +test_that("theme_civilytics has transparent background by default", { th <- theme_civilytics() + expect_true(is.na(th$plot.background$fill)) +}) + +test_that("theme_civilytics uses brand paper color when paper_bg = TRUE", { + th <- theme_civilytics(paper_bg = TRUE) expect_equal(th$plot.background$fill, unname(civilytics_colors["paper"])) })