mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: email category badges shouldn't use category text color (#25655)
This commit is contained in:
@@ -91,6 +91,6 @@ module CategoryBadge
|
|||||||
result << ERB::Util.html_escape(category.name)
|
result << ERB::Util.html_escape(category.name)
|
||||||
result << "</span></span>"
|
result << "</span></span>"
|
||||||
|
|
||||||
wrap_in_link(result, data[:category_url], "", "color: ##{category.text_color};")
|
wrap_in_link(result, data[:category_url])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -34,11 +34,10 @@ RSpec.describe CategoryBadge do
|
|||||||
end
|
end
|
||||||
|
|
||||||
it "includes inline color style when inline_style is true" do
|
it "includes inline color style when inline_style is true" do
|
||||||
c = Fabricate(:category, color: "123456", text_color: "654321")
|
c = Fabricate(:category, color: "123456")
|
||||||
|
|
||||||
html = CategoryBadge.html_for(c, inline_style: true)
|
html = CategoryBadge.html_for(c, inline_style: true)
|
||||||
|
|
||||||
expect(html).to include("color: #654321;")
|
|
||||||
expect(html).to include("background-color: #123456;")
|
expect(html).to include("background-color: #123456;")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user