This reverts commit https://github.com/discourse/discourse/commit/a53d8d3e61d33dde22628a8ceb94b6a27cb0a99a and https://github.com/discourse/discourse/commit/105634435fe605f122e4a0a4a4293cc37a6747c6. Reverted because the change broke some components. Will be added back in a few days.
This commit is contained in:
@@ -54,24 +54,4 @@ describe ThemeJavascriptsController do
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#show_tests" do
|
||||
context "theme settings" do
|
||||
let(:component) { Fabricate(:theme, component: true, name: 'enabled-component') }
|
||||
|
||||
it "forces default values" do
|
||||
ThemeField.create!(
|
||||
theme: component,
|
||||
target_id: Theme.targets[:settings],
|
||||
name: "yaml",
|
||||
value: "num_setting: 5"
|
||||
)
|
||||
component.reload
|
||||
component.update_setting(:num_setting, 643)
|
||||
|
||||
get "/theme-javascripts/tests/#{component.id}.js"
|
||||
expect(response.body).to include("require(\"discourse/lib/theme-settings-store\").registerSettings(#{component.id}, {\"num_setting\":5}, { force: true });")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user