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
path: root/spec
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-07-07 18:50:03 +0300
committerRobert Speicher <robert@gitlab.com>2016-07-07 18:50:03 +0300
commit062c7a30742d617d8d0939c3bb6ba733919fe00b (patch)
treec83f010665aa19237b9fa3de7e393231a82b1b19 /spec
parent3c89a788c795fba2b050a0af0d8261e302d8cded (diff)
parentf67984626b7422e6a110d343860f1079243dab07 (diff)
Merge branch 'fix/import-controller-error' into 'master'
Fixes 404 redirect after validation fails importing a project Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/19558 See merge request !5143
Diffstat (limited to 'spec')
-rw-r--r--spec/features/projects/import_export/import_file_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb
index 9d66f76ef58..bc3bf53fe9d 100644
--- a/spec/features/projects/import_export/import_file_spec.rb
+++ b/spec/features/projects/import_export/import_file_spec.rb
@@ -42,6 +42,23 @@ feature 'project import', feature: true, js: true do
expect(project.import_status).to eq('finished')
end
+ scenario 'invalid project' do
+ project = create(:project, namespace_id: 2)
+
+ visit new_project_path
+
+ select2('2', from: '#project_namespace_id')
+ fill_in :project_path, with: project.name, visible: true
+ click_link 'GitLab export'
+
+ attach_file('file', file)
+ click_on 'Import project'
+
+ page.within('.flash-container') do
+ expect(page).to have_content('Project could not be imported')
+ end
+ end
+
def wiki_exists?
wiki = ProjectWiki.new(project)
File.exist?(wiki.repository.path_to_repo) && !wiki.repository.empty?