mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Use the header background color for a site in the digest email.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user