Commit f7947edd authored by Shinya Maeda's avatar Shinya Maeda

Fix LFS false positive spec

parent 1d280246
......@@ -88,7 +88,13 @@ module ObjectStorage
def changed_mounts
self.class.uploaders.select do |mount, uploader_class|
mounted_as = uploader_class.serialization_column(self.class, mount)
mount if send(:"#{mounted_as}_changed?") && send(:"#{mounted_as}")&.exists? # rubocop:disable GitlabSecurity/PublicSend
uploader = send(:"#{mounted_as}") # rubocop:disable GitlabSecurity/PublicSend
next unless uploader
next unless uploader.exists?
next unless send(:"#{mounted_as}_changed?") # rubocop:disable GitlabSecurity/PublicSend
mount
end.keys
end
......
......@@ -1025,7 +1025,7 @@ describe 'Git LFS API and storage' do
context 'and workhorse requests upload finalize for a new lfs object' do
before do
allow_any_instance_of(LfsObjectUploader).to receive(:exists?) { false }
lfs_object.destroy
end
context 'with object storage disabled' do
......
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