summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-03-30 16:32:21 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-04-05 10:21:51 +0200
commit84ee2ddbcd850d29ae852333c57e2e8381f5a535 (patch)
tree2ca70f7c2efa3c3828a9c4356bcc7d76c3872a67 /spec/services
parentd5d7bcf8b7404a436c577e2b112aa59dc2901378 (diff)
downloadgitlab-ce-84ee2ddbcd850d29ae852333c57e2e8381f5a535.tar.gz
Export LFS Objects when exporting a project
The LFS files will be included in the `lfs-objects` directory in the archive.
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/projects/import_export/export_service_spec.rb43
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/services/projects/import_export/export_service_spec.rb b/spec/services/projects/import_export/export_service_spec.rb
index 51491c7d529..f9e5530bc9d 100644
--- a/spec/services/projects/import_export/export_service_spec.rb
+++ b/spec/services/projects/import_export/export_service_spec.rb
@@ -8,6 +8,49 @@ describe Projects::ImportExport::ExportService do
let(:service) { described_class.new(project, user) }
let!(:after_export_strategy) { Gitlab::ImportExport::AfterExportStrategies::DownloadNotificationStrategy.new }
+ it 'saves the version' do
+ expect(Gitlab::ImportExport::VersionSaver).to receive(:new).and_call_original
+
+ service.execute
+ end
+
+ it 'saves the avatar' do
+ expect(Gitlab::ImportExport::AvatarSaver).to receive(:new).and_call_original
+
+ service.execute
+ end
+
+ it 'saves the models' do
+ expect(Gitlab::ImportExport::ProjectTreeSaver).to receive(:new).and_call_original
+
+ service.execute
+ end
+
+ it 'saves the uploads' do
+ expect(Gitlab::ImportExport::UploadsSaver).to receive(:new).and_call_original
+
+ service.execute
+ end
+
+ it 'saves the repo' do
+ # once for the normal repo, once for the wiki
+ expect(Gitlab::ImportExport::RepoSaver).to receive(:new).twice.and_call_original
+
+ service.execute
+ end
+
+ it 'saves the lfs objects' do
+ expect(Gitlab::ImportExport::LfsSaver).to receive(:new).and_call_original
+
+ service.execute
+ end
+
+ it 'saves the wiki repo' do
+ expect(Gitlab::ImportExport::WikiRepoSaver).to receive(:new).and_call_original
+
+ service.execute
+ end
+
context 'when all saver services succeed' do
before do
allow(service).to receive(:save_services).and_return(true)