mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 07:11:34 +08:00
UX: Restore category badge colours on 404 page (#24754)
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user