mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 22:33:45 +08:00
a440e15291
Why this change? Objects type for theme settings is no longer considered experimental so we are dropping the site setting.
21 lines
604 B
Ruby
21 lines
604 B
Ruby
# frozen_string_literal: true
|
|
|
|
RSpec.describe ThemeSettingsSerializer do
|
|
fab!(:theme)
|
|
|
|
let(:theme_setting) do
|
|
yaml = File.read("#{Rails.root}/spec/fixtures/theme_settings/objects_settings.yaml")
|
|
theme.set_field(target: :settings, name: "yaml", value: yaml)
|
|
theme.save!
|
|
theme.settings
|
|
end
|
|
|
|
describe "#objects_schema" do
|
|
it "should include the attribute when theme setting is typed objects" do
|
|
payload = ThemeSettingsSerializer.new(theme_setting[:objects_setting]).as_json
|
|
|
|
expect(payload[:theme_settings][:objects_schema][:name]).to eq("section")
|
|
end
|
|
end
|
|
end
|