FIX: Remove site settings override for deprecated url site settings.
This commit is contained in:
parent
e25b3965a7
commit
81b3bdaabd
|
@ -6,6 +6,7 @@ module Jobs
|
|||
Jobs::MigrateUrlSiteSettings::SETTINGS.each do |old_setting, new_setting|
|
||||
if SiteSetting.where("name = ? AND value IS NOT NULL", new_setting).exists?
|
||||
SiteSetting.public_send("#{old_setting}=", nil, warn: false)
|
||||
SiteSetting.find_by(name: old_setting).destroy!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,6 +21,7 @@ RSpec.describe Jobs::CleanUpDeprecatedUrlSiteSettings do
|
|||
described_class.new.execute({})
|
||||
end.to change { SiteSetting.logo_url }.from("/test/some/url").to("")
|
||||
|
||||
expect(SiteSetting.exists?(name: "logo_url")).to eq(false)
|
||||
expect(SiteSetting.logo).to eq(logo_upload)
|
||||
expect(SiteSetting.logo_small_url).to eq('/test/another/url')
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue