This commit is contained in:
Andy Smith
2025-11-13 17:32:36 -06:00
parent 8ad0d05750
commit 2b0fd0909d
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ module Card::Colored
def color
if column&.color.present?
found = COLORS.find { |c| c[:value] == column.color }
return found || { name: column.color, value: column.color }
found || { name: column.color, value: column.color }
else
DEFAULT_COLOR
end
+1 -1
View File
@@ -7,6 +7,6 @@ class Card::ColoredTest < ActiveSupport::TestCase
end
test "infer color from column" do
assert_equal cards(:layout).column.color, cards(:layout).color
assert_equal cards(:layout).column.color, cards(:layout).color[:value]
end
end