Add non-ffffff test for `ThemeHelper#get_hex_color_from_theme_value`

This commit is contained in:
Andreas Nedbal 2020-05-06 13:37:26 +02:00
parent 892b708c6f
commit ec998686ff
1 changed files with 5 additions and 1 deletions

View File

@ -4,9 +4,13 @@ require "rails_helper"
describe ThemeHelper, :type => :helper do
describe "#get_hex_color_from_theme_value" do
it "returns the proper hex value from the theme value" do
it "returns the proper hex value from the decimal value for white" do
expect(helper.get_hex_color_from_theme_value(16777215)).to eq("ffffff")
end
it "returns the proper hex value from the decimal value for purple" do
expect(helper.get_hex_color_from_theme_value(6174129)).to eq("5e35b1")
end
end
describe "#get_decimal_triplet_from_hex" do