Skip to content

Commit

Permalink
FIX: email category badges shouldn't use category text color (discour…
Browse files Browse the repository at this point in the history
  • Loading branch information
awesomerobot authored Feb 13, 2024
1 parent 8eab06c commit faf0807
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/category_badge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,6 @@ def self.style_for_email(category, opts)
result << ERB::Util.html_escape(category.name)
result << "</span></span>"

wrap_in_link(result, data[:category_url], "", "color: ##{category.text_color};")
wrap_in_link(result, data[:category_url])
end
end
3 changes: 1 addition & 2 deletions spec/lib/category_badge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@
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

0 comments on commit faf0807

Please sign in to comment.