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:
Alan Guo Xiang Tan
2024-04-04 12:01:31 +08:00
committed by GitHub
parent 49409f4985
commit a440e15291
11 changed files with 11 additions and 57 deletions

View File

@ -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