Skip to content

Commit

Permalink
tests(b_get_color): Add test for null case
Browse files Browse the repository at this point in the history
  • Loading branch information
gadenbuie committed Dec 10, 2024
1 parent 038f6a2 commit 9bab3c1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/testthat/test-bs-theme-preset-brand.R
Original file line number Diff line number Diff line change
Expand Up @@ -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()", {
Expand Down

0 comments on commit 9bab3c1

Please sign in to comment.