FIX: Don't rely on setting data type read from database

This commit is contained in:
Gerhard Schlager
2018-07-24 11:24:34 +02:00
parent 9989c8179d
commit 84d14fd8a0
3 changed files with 17 additions and 1 deletions

View File

@ -124,6 +124,15 @@ describe SiteSettingExtension do
expect(settings2.hello).to eq(99)
end
it "does not override types in the type supervisor" do
settings.setting(:foo, "bar")
settings.provider.save(:foo, "bar", SiteSetting.types[:enum])
settings.refresh!
expect(settings.foo).to eq("bar")
settings.foo = "baz"
expect(settings.foo).to eq("baz")
end
end
describe "multisite" do