From faf0807b373a092c54d79b586c0e481108b1814a Mon Sep 17 00:00:00 2001 From: Kris Date: Tue, 13 Feb 2024 10:18:36 -0500 Subject: [PATCH] FIX: email category badges shouldn't use category text color (#25655) --- lib/category_badge.rb | 2 +- spec/lib/category_badge_spec.rb | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/category_badge.rb b/lib/category_badge.rb index f9da58fe2b8..05ac27a358e 100644 --- a/lib/category_badge.rb +++ b/lib/category_badge.rb @@ -91,6 +91,6 @@ module CategoryBadge result << ERB::Util.html_escape(category.name) result << "" - wrap_in_link(result, data[:category_url], "", "color: ##{category.text_color};") + wrap_in_link(result, data[:category_url]) end end diff --git a/spec/lib/category_badge_spec.rb b/spec/lib/category_badge_spec.rb index e35cac4b03c..469f2bb4ea8 100644 --- a/spec/lib/category_badge_spec.rb +++ b/spec/lib/category_badge_spec.rb @@ -34,11 +34,10 @@ RSpec.describe CategoryBadge do end 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) - expect(html).to include("color: #654321;") expect(html).to include("background-color: #123456;") end end