Commit e63d27d8 authored by winh's avatar winh

Add failing test for #32728

parent b00c268b
......@@ -49,6 +49,23 @@ describe Label, models: true do
expect(label.color).to eq('#abcdef')
end
it 'uses default color if color is missing' do
label = described_class.new(color: nil)
expect(label.color).to be(Label::DEFAULT_COLOR)
end
end
describe '#text_color' do
it 'uses default color if color is missing' do
expect(LabelsHelper).to receive(:text_color_for_bg).with(Label::DEFAULT_COLOR).
and_return(spy)
label = described_class.new(color: nil)
label.text_color
end
end
describe '#title' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment