summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2016-07-20 16:09:43 +0200
committerJames Lopez <james@jameslopez.es>2016-07-20 16:09:43 +0200
commitf0603e4cb7cfc043239554857a1143943b50b22f (patch)
tree2658f71c340817d64fce237e1941cfeda8e48517
parent4eb9045ddede6d4b23cb0f9dd9676873c5a21f8c (diff)
downloadgitlab-ce-f0603e4cb7cfc043239554857a1143943b50b22f.tar.gz
added spec, fixed wording
-rw-r--r--app/views/projects/new.html.haml6
-rw-r--r--spec/features/projects/import_export/import_file_spec.rb13
2 files changed, 16 insertions, 3 deletions
diff --git a/app/views/projects/new.html.haml b/app/views/projects/new.html.haml
index 5025542f0f9..facdfcc9447 100644
--- a/app/views/projects/new.html.haml
+++ b/app/views/projects/new.html.haml
@@ -136,12 +136,12 @@
});
$('.btn_import_gitlab_project').attr('disabled',true)
- $('.import_gitlab_project').attr('title', 'Project path required.');
+ $('.import_gitlab_project').attr('title', 'Project path and name required.');
$('.import_gitlab_project').click(function( event ) {
if($('.btn_import_gitlab_project').attr('disabled')) {
event.preventDefault();
- new Flash("Please enter a path for the project to be imported to.");
+ new Flash("Please enter path and name for the project to be imported to.");
}
});
@@ -152,7 +152,7 @@
$(".flash-container").html("")
} else {
$('.btn_import_gitlab_project').attr('disabled',true);
- $('.import_gitlab_project').attr('title', 'Project path required.');
+ $('.import_gitlab_project').attr('title', 'Project path and name required.');
}
});
diff --git a/spec/features/projects/import_export/import_file_spec.rb b/spec/features/projects/import_export/import_file_spec.rb
index bc3bf53fe9d..40809aa4aba 100644
--- a/spec/features/projects/import_export/import_file_spec.rb
+++ b/spec/features/projects/import_export/import_file_spec.rb
@@ -59,6 +59,19 @@ feature 'project import', feature: true, js: true do
end
end
+ scenario 'project with no name' do
+ project = create(:project, namespace_id: 2)
+
+ visit new_project_path
+
+ select2('2', from: '#project_namespace_id')
+ click_link 'GitLab export'
+
+ page.within('.flash-container') do
+ expect(page).to have_content('Please enter path and name')
+ end
+ end
+
def wiki_exists?
wiki = ProjectWiki.new(project)
File.exist?(wiki.repository.path_to_repo) && !wiki.repository.empty?