Code review comments.

This commit is contained in:
Alan Guo Xiang Tan
2021-06-18 10:16:26 +08:00
parent 8e3691d537
commit 44aa46ca05
29 changed files with 159 additions and 64 deletions

View File

@ -139,12 +139,21 @@ describe SvgSprite do
it 'includes icons defined in theme modifiers' do
theme = Fabricate(:theme)
child_theme = Fabricate(:theme, component: true)
theme.add_relative_theme!(:child, child_theme)
expect(SvgSprite.all_icons(theme.id)).not_to include("dragon")
theme.theme_modifier_set.svg_icons = ["dragon"]
theme.save!
expect(SvgSprite.all_icons(theme.id)).to include("dragon")
child_theme.theme_modifier_set.svg_icons = ["fly"]
child_theme.save!
icons = SvgSprite.all_icons(theme.id)
expect(icons).to include("dragon")
expect(icons).to include("fly")
end
it 'includes custom icons from a sprite in a theme' do