FIX: Upload#migrate_to_new_scheme should not migrate system uploads.

This commit is contained in:
Guo Xiang Tan
2019-03-14 12:38:16 +08:00
parent 1bc96177dd
commit 40b03e717b
2 changed files with 13 additions and 1 deletions

View File

@@ -250,4 +250,13 @@ describe Upload do
end
end
describe '.migrate_to_new_scheme' do
it 'should not migrate system uploads' do
SiteSetting.migrate_to_new_scheme = true
expect { Upload.migrate_to_new_scheme }
.to_not change { Upload.pluck(:url) }
end
end
end