2019-07-25 01:21:37 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-03-18 13:26:18 -04:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2020-06-24 05:08:32 -04:00
|
|
|
RSpec.describe Backup::Uploads do
|
2019-03-18 13:26:18 -04:00
|
|
|
let(:progress) { StringIO.new }
|
2019-12-12 07:07:33 -05:00
|
|
|
|
2019-03-18 13:26:18 -04:00
|
|
|
subject(:backup) { described_class.new(progress) }
|
|
|
|
|
|
|
|
describe '#initialize' do
|
|
|
|
it 'uses the correct upload dir' do
|
|
|
|
Dir.mktmpdir do |tmpdir|
|
|
|
|
FileUtils.mkdir_p("#{tmpdir}/uploads")
|
|
|
|
|
|
|
|
allow(Gitlab.config.uploads).to receive(:storage_path) { tmpdir }
|
|
|
|
|
|
|
|
expect(backup.app_files_dir).to eq("#{tmpdir}/uploads")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|