mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
FIX: Prevent duplicate params for raw template theme handlebars helpers
This commit is contained in:
@ -62,6 +62,12 @@ describe ThemeJavascriptCompiler do
|
||||
expect(render("{{dummy-helper themeSettings.setting_key}}")).
|
||||
to eq('dummy(setting(22:setting_key))')
|
||||
end
|
||||
|
||||
it "doesn't duplicate number parameter inside {{each}}" do
|
||||
expect(compiler.compile("{{#each item as |test test2|}}{{theme-setting 'setting_key'}}{{/each}}")).
|
||||
to include('{"name":"theme-setting","hash":{},"hashTypes":{},"hashContexts":{},"types":["NumberLiteral","StringLiteral"]')
|
||||
# Fail would be if theme-setting is defined with types:["NumberLiteral","NumberLiteral","StringLiteral"]
|
||||
end
|
||||
end
|
||||
|
||||
describe ThemeJavascriptCompiler::EmberTemplatePrecompiler do
|
||||
|
Reference in New Issue
Block a user