Use the header background color for a site in the digest email.

This commit is contained in:
Robin Ward
2014-07-17 12:31:37 -04:00
parent f06f8abedd
commit ede8f22971
4 changed files with 18 additions and 1 deletions

View File

@@ -40,6 +40,16 @@ describe ColorScheme do
second.hex.should == base_colors[:second_one]
third.hex.should == 'F00D33'
end
context "hex_for_name without anything enabled" do
it "returns nil for a missing attribute" do
described_class.hex_for_name('undefined').should be_nil
end
it "returns the base color for an attribute" do
described_class.hex_for_name('second_one').should == base_colors[:second_one]
end
end
end
describe "destroy" do
@@ -59,8 +69,10 @@ describe ColorScheme do
end
it "returns the enabled color scheme" do
described_class.hex_for_name('$primary_background_color').should be_nil
c = described_class.create(valid_params.merge(enabled: true))
described_class.enabled.id.should == c.id
described_class.hex_for_name('$primary_background_color').should == "FFBB00"
end
end
end