Commit cbd0201f authored by James Lopez's avatar James Lopez

fixing specs and some code cleanup

parent 7019a19b
......@@ -7,10 +7,14 @@
= form_tag import_gitlab_project_path, class: 'form-horizontal', multipart: true do
%p
Project will be imported to path #{@path}
Project will be imported to path
%strong
#{@path}
%p
To get started add your exported project file below:
To get started add your exported project file below, then you will be redirected to the new project page and the project will appear once the import is done.
%p
You can generate a new export file from your project settings.
.form-group
= hidden_field_tag :namespace_id, @namespace_id
= hidden_field_tag :path, @path
......
%p
Project #{@project.name} was exported succesfully
Project #{@project.name} was exported successfully.
%p
The project export can be downloaded from:
= link_to download_export_namespace_project_url(@project.namespace, @project) do
......
Project <%= @project.name %> was exported succesfully
Project <%= @project.name %> was exported successfully.
The project export can be downloaded from:
<%= download_export_namespace_project_url(@project.namespace, @project) %>
......
......@@ -39,10 +39,11 @@ feature 'project import', feature: true, js: true do
expect(project.merge_requests).not_to be_empty
expect(project.repo_exists?).to be true
expect(wiki_exists?).to be true
expect(project.import_status).to eq('finished')
end
def wiki_exists?
wiki = ProjectWiki.new(project)
File.exists?(wiki.repository.path_to_repo) && !wiki.repository.empty?
File.exist?(wiki.repository.path_to_repo) && !wiki.repository.empty?
end
end
......@@ -6,7 +6,8 @@ describe Gitlab::ImportExport::ProjectTreeRestorer, services: true do
let(:user) { create(:user) }
let(:namespace) { create(:namespace, owner: user) }
let(:shared) { Gitlab::ImportExport::Shared.new(relative_path: "", project_path: 'path') }
let(:project_tree_restorer) { described_class.new(user: user, shared: shared, namespace_id: namespace.id) }
let(:project) { create(:empty_project, name: 'project', path: 'project') }
let(:project_tree_restorer) { described_class.new(user: user, shared: shared, project: project) }
let(:restored_project_json) { project_tree_restorer.restore }
before do
......
......@@ -30,7 +30,7 @@ describe Gitlab::ImportExport::ProjectTreeSaver, services: true do
end
it 'saves the correct json' do
expect(saved_project_json).to include({ "name" => project.name })
expect(saved_project_json).to include({ "visibility_level" => 20 })
end
it 'has events' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment