From ec998686ffb93ff607062ec9a70e596e73304953 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Wed, 6 May 2020 13:37:26 +0200 Subject: [PATCH] Add non-ffffff test for `ThemeHelper#get_hex_color_from_theme_value` --- spec/helpers/theme_helper_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/helpers/theme_helper_spec.rb b/spec/helpers/theme_helper_spec.rb index 69f2b588..820c8103 100644 --- a/spec/helpers/theme_helper_spec.rb +++ b/spec/helpers/theme_helper_spec.rb @@ -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