import_export_spec.rb 710 Bytes
Newer Older
1
2
3
4
require 'spec_helper'

describe Gitlab::ImportExport, services: true do
  describe 'export filename' do
5
6
    let(:group) { create(:group, :nested) }
    let(:project) { create(:empty_project, :public, path: 'project-path', namespace: group) }
7
8
9
10
11
12

    it 'contains the project path' do
      expect(described_class.export_filename(project: project)).to include(project.path)
    end

    it 'contains the namespace path' do
13
      expect(described_class.export_filename(project: project)).to include(project.namespace.full_path)
14
15
16
17
18
19
20
21
22
    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