summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-11-23 10:49:42 +0100
committerJames Lopez <james@jameslopez.es>2017-11-23 10:49:42 +0100
commit22219e8968ee2bff9d84e0ac789773cce6fc749b (patch)
tree091505df99da682fdae64a541332a9a6c8985a23
parent0ed17fdca48d26bafa1dafc6d0f33ffbfb6e9b47 (diff)
downloadgitlab-ce-fix/import-uploads-hashed-storage.tar.gz
-rw-r--r--spec/lib/gitlab/import_export/uploads_restorer_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/lib/gitlab/import_export/uploads_restorer_spec.rb b/spec/lib/gitlab/import_export/uploads_restorer_spec.rb
index c5df9babfc1..63992ea8ab8 100644
--- a/spec/lib/gitlab/import_export/uploads_restorer_spec.rb
+++ b/spec/lib/gitlab/import_export/uploads_restorer_spec.rb
@@ -4,7 +4,7 @@ describe Gitlab::ImportExport::UploadsRestorer do
describe 'bundle a project Git repo' do
let(:export_path) { "#{Dir.tmpdir}/uploads_saver_spec" }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: project.full_path) }
- let(:uploads_path) { File.join(CarrierWave.root, GitlabUploader.root_dir) }
+ let(:uploads_path) { FileUploader.dynamic_path_segment(project) }
before do
allow_any_instance_of(Gitlab::ImportExport).to receive(:storage_path).and_return(export_path)
@@ -28,7 +28,7 @@ describe Gitlab::ImportExport::UploadsRestorer do
it 'copies the uploads to the project path' do
restorer.restore
- uploads = Dir.glob(File.join(uploads_path, project.disk_path, '**/*')).map { |file| File.basename(file) }
+ uploads = Dir.glob(File.join(uploads_path, '**/*')).map { |file| File.basename(file) }
expect(uploads).to include('dummy.txt')
end
@@ -46,7 +46,7 @@ describe Gitlab::ImportExport::UploadsRestorer do
it 'copies the uploads to the project path' do
restorer.restore
- uploads = Dir.glob(File.join(uploads_path, project.disk_path, '**/*')).map { |file| File.basename(file) }
+ uploads = Dir.glob(File.join(uploads_path, '**/*')).map { |file| File.basename(file) }
expect(uploads).to include('dummy.txt')
end