From 9bab3c1fcd5ae6d21a67f49a5ef77b70db4c76c3 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Tue, 10 Dec 2024 14:40:21 -0500 Subject: [PATCH] tests(b_get_color): Add test for null case --- tests/testthat/test-bs-theme-preset-brand.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/testthat/test-bs-theme-preset-brand.R b/tests/testthat/test-bs-theme-preset-brand.R index 49d84635f..091fabd45 100644 --- a/tests/testthat/test-bs-theme-preset-brand.R +++ b/tests/testthat/test-bs-theme-preset-brand.R @@ -108,6 +108,11 @@ describe("b_get_color()", { "recursion limit" ) }) + + it("returns `key` if `brand.color` isn't present", { + brand <- list(meta = list(name = "no color")) + expect_equal(b_get_color(brand, "red"), "red") + }) }) describe("maybe_convert_font_size_to_rem()", {