diff options
author | Robert Speicher <rspeicher@gmail.com> | 2016-01-25 02:06:46 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-25 02:06:46 +0300 |
commit | 2e911721d2d288a4b2015a55dedd19b2313a452f (patch) | |
tree | 7ae39e2e0da31570522371bb50089e405e6f1746 /spec/helpers | |
parent | 07ee83932fb755f4e0c89ba3bf172a6ae728d601 (diff) |
Update text_color_for_bg helper to support RGB triplet color codes
Closes #12677
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/labels_helper_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/helpers/labels_helper_spec.rb b/spec/helpers/labels_helper_spec.rb index 0c8d06b7059..0b9176357bc 100644 --- a/spec/helpers/labels_helper_spec.rb +++ b/spec/helpers/labels_helper_spec.rb @@ -66,5 +66,10 @@ describe LabelsHelper do it 'uses dark text on light backgrounds' do expect(text_color_for_bg('#EEEEEE')).to eq('#333333') end + + it 'supports RGB triplets' do + expect(text_color_for_bg('#FFF')).to eq '#333333' + expect(text_color_for_bg('#000')).to eq '#FFFFFF' + end end end |