mirror of
https://github.com/discourse/discourse.git
synced 2025-06-02 04:08:41 +08:00
DEV: Remove experimental_objects_type_for_theme_settings
site setting (#26507)
Why this change? Objects type for theme settings is no longer considered experimental so we are dropping the site setting.
This commit is contained in:

committed by
GitHub

parent
49409f4985
commit
a440e15291
@ -4,28 +4,7 @@ RSpec.describe ThemeSetting do
|
||||
fab!(:theme)
|
||||
|
||||
context "for validations" do
|
||||
it "should be invalid when setting data_type to objects and `experimental_objects_type_for_theme_settings` is disabled" do
|
||||
SiteSetting.experimental_objects_type_for_theme_settings = false
|
||||
|
||||
theme_setting =
|
||||
ThemeSetting.new(name: "test", data_type: ThemeSetting.types[:objects], theme:)
|
||||
|
||||
expect(theme_setting.valid?).to eq(false)
|
||||
expect(theme_setting.errors[:data_type]).to contain_exactly("is not included in the list")
|
||||
end
|
||||
|
||||
it "should be valid when setting data_type to objects and `experimental_objects_type_for_theme_settings` is enabled" do
|
||||
SiteSetting.experimental_objects_type_for_theme_settings = true
|
||||
|
||||
theme_setting =
|
||||
ThemeSetting.new(name: "test", data_type: ThemeSetting.types[:objects], theme:)
|
||||
|
||||
expect(theme_setting.valid?).to eq(true)
|
||||
end
|
||||
|
||||
it "should be invalid when json_value size is greater than the maximum allowed size" do
|
||||
SiteSetting.experimental_objects_type_for_theme_settings = true
|
||||
|
||||
json_value = { "key" => "value" }
|
||||
bytesize = json_value.to_json.bytesize
|
||||
|
||||
|
Reference in New Issue
Block a user