Commit bb2a847c authored by Nick Thomas's avatar Nick Thomas

Merge branch 'rails5-fix-application-setting-spec' into 'master'

Write repository_storages without type casting

Closes #46238

See merge request gitlab-org/gitlab-ce!19367
parents 0e9cd580 fb71c468
...@@ -110,10 +110,9 @@ describe ApplicationSetting do ...@@ -110,10 +110,9 @@ describe ApplicationSetting do
# Upgraded databases will have this sort of content # Upgraded databases will have this sort of content
context 'repository_storages is a String, not an Array' do context 'repository_storages is a String, not an Array' do
before do before do
setting.__send__(:raw_write_attribute, :repository_storages, 'default') described_class.where(id: setting.id).update_all(repository_storages: 'default')
end end
it { expect(setting.repository_storages_before_type_cast).to eq('default') }
it { expect(setting.repository_storages).to eq(['default']) } it { expect(setting.repository_storages).to eq(['default']) }
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment