UX: Restore category badge colours on 404 page (#24754)

This commit is contained in:
David Taylor
2023-12-06 17:49:19 +00:00
committed by GitHub
parent 42e5bbaf38
commit 48ec946702
2 changed files with 21 additions and 0 deletions

View File

@ -20,4 +20,16 @@ RSpec.describe CategoryBadge do
expect(html).to include("title='' <b id="x">'")
end
it "includes color vars" do
c = Fabricate(:category, color: "123456", text_color: "654321")
html = CategoryBadge.html_for(c)
expect(html).to have_tag(
"span[data-category-id]",
with: {
style: "--category-badge-color: #123456; --category-badge-text-color: #654321;",
},
)
end
end