Fix test
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user