Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-07-15 13:47:06 +0300
committerJames Lopez <james@jameslopez.es>2016-07-15 13:55:28 +0300
commit65549a5866da6ceaf7ee4052736077879b5e641d (patch)
tree9aea20cd1061f8762d50d169a22084a5c1ef3348 /spec/lib/gitlab/import_export/import_export_spec.rb
parent86f83db2b0ebc6d4cf546a71e151bb8552215a3a (diff)
add project name and namespace to filename on project export
added changelog
Diffstat (limited to 'spec/lib/gitlab/import_export/import_export_spec.rb')
-rw-r--r--spec/lib/gitlab/import_export/import_export_spec.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/import_export_spec.rb b/spec/lib/gitlab/import_export/import_export_spec.rb
new file mode 100644
index 00000000000..d6409a29550
--- /dev/null
+++ b/spec/lib/gitlab/import_export/import_export_spec.rb
@@ -0,0 +1,21 @@
+require 'spec_helper'
+
+describe Gitlab::ImportExport, services: true do
+ describe 'export filename' do
+ let(:project) { create(:project, :public, path: 'project-path') }
+
+ it 'contains the project path' do
+ expect(described_class.export_filename(project: project)).to include(project.path)
+ end
+
+ it 'contains the namespace path' do
+ expect(described_class.export_filename(project: project)).to include(project.namespace.path)
+ end
+
+ it 'does not go over a certain length' do
+ project.path = 'a' * 100
+
+ expect(described_class.export_filename(project: project).length).to be < 70
+ end
+ end
+end