summaryrefslogtreecommitdiff
path: root/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb')
-rw-r--r--spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
index ce43a7e4d54..de2abfc1985 100644
--- a/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
+++ b/spec/services/projects/hashed_storage/migrate_attachments_service_spec.rb
@@ -49,13 +49,10 @@ describe Projects::HashedStorage::MigrateAttachmentsService do
FileUtils.mkdir_p(base_path(hashed_storage))
end
- it 'skips moving the file and goes to next' do
+ it 'raises AttachmentMigrationError' do
expect(FileUtils).not_to receive(:mv).with(base_path(legacy_storage), base_path(hashed_storage))
- service.execute
-
- expect(File.exist?(base_path(legacy_storage))).to be_truthy
- expect(File.file?(old_path)).to be_truthy
+ expect { service.execute }.to raise_error(Projects::HashedStorage::AttachmentMigrationError)
end
end
end