mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
DEV: Drop the deprecated themeSettings.blah
syntax (#17394)
This syntax has been printing deprecation messages since 880311dd4d2b367e54cc8244fba60fce69e121c3
This commit is contained in:
@ -52,15 +52,6 @@ describe ThemeJavascriptCompiler do
|
||||
to eq('dummy(theme_translations.22.translation_key)')
|
||||
end
|
||||
|
||||
it 'works with the old settings syntax' do
|
||||
expect(render("{{themeSettings.setting_key}}")).
|
||||
to eq('setting(22:setting_key)')
|
||||
|
||||
# Works when used inside other statements
|
||||
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"]')
|
||||
@ -112,21 +103,6 @@ describe ThemeJavascriptCompiler do
|
||||
standard_compile "{{dummy-helper (theme-prefix #{theme_id} 'translation_key')}}"
|
||||
)
|
||||
end
|
||||
|
||||
it 'works with the old settings syntax' do
|
||||
expect(
|
||||
theme_compile "{{themeSettings.setting_key}}"
|
||||
).to eq(
|
||||
standard_compile "{{theme-setting #{theme_id} 'setting_key' deprecated=true}}"
|
||||
)
|
||||
|
||||
# Works when used inside other statements
|
||||
expect(
|
||||
theme_compile "{{dummy-helper themeSettings.setting_key}}"
|
||||
).to eq(
|
||||
standard_compile "{{dummy-helper (theme-setting #{theme_id} 'setting_key' deprecated=true)}}"
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#append_raw_template" do
|
||||
|
Reference in New Issue
Block a user