FIX: emails should use default theme colors

This commit is contained in:
Neil Lalonde
2017-05-03 14:35:13 -04:00
parent e38014772b
commit 389a0e1a1c
2 changed files with 22 additions and 9 deletions
+20
View File
@@ -244,6 +244,26 @@ describe UserNotifications do
expect(html).to_not include hidden.raw
expect(html).to_not include user_deleted.raw
end
it "uses theme color" do
cs = Fabricate(:color_scheme, name: 'Fancy', color_scheme_colors: [
Fabricate(:color_scheme_color, name: 'header_primary', hex: 'F0F0F0'),
Fabricate(:color_scheme_color, name: 'header_background', hex: '1E1E1E'),
Fabricate(:color_scheme_color, name: 'tertiary', hex: '858585')
])
theme = Theme.create!(
name: 'my name',
user_id: Fabricate(:admin).id,
user_selectable: true,
color_scheme_id: cs.id
)
theme.set_default!
html = subject.html_part.body.to_s
expect(html).to include 'F0F0F0'
expect(html).to include '1E1E1E'
expect(html).to include '858585'
end
end
end