Forráskód Böngészése

Add spec for positive hex color value

Guilherme J. Tramontina 10 éve
szülő
commit
a8c863ff86
1 módosított fájl, 4 hozzáadás és 0 törlés
  1. 4 0
      spec/models/scenario_spec.rb

+ 4 - 0
spec/models/scenario_spec.rb

@@ -23,6 +23,8 @@ describe Scenario do
     it "validates tag_fg_color is hex color" do
       new_instance.tag_fg_color = '#N07H3X'
       new_instance.should_not be_valid
+      new_instance.tag_fg_color = '#BADA55'
+      new_instance.should be_valid
     end
 
     it "allows nil tag_fg_color" do
@@ -33,6 +35,8 @@ describe Scenario do
     it "validates tag_bg_color is hex color" do
       new_instance.tag_bg_color = '#N07H3X'
       new_instance.should_not be_valid
+      new_instance.tag_bg_color = '#BADA55'
+      new_instance.should be_valid
     end
 
     it "allows nil tag_bg_color" do