mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 13:41:31 +08:00
FIX: email category badges shouldn't use category text color (#25655)
This commit is contained in:
parent
8eab06cb2f
commit
faf0807b37
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user