diff options
author | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-07-26 14:21:53 +0200 |
---|---|---|
committer | Z.J. van de Weg <git@zjvandeweg.nl> | 2017-07-28 11:32:46 +0200 |
commit | 1d3815f89b9b9f5ecfd6dd15158a2988603b9ed8 (patch) | |
tree | a694e1e05f58fc3fe5ae00135d4a439eef7c8150 /spec/features/projects_spec.rb | |
parent | d964816b9fe56679ffc0b331e701f7b24db5c6a9 (diff) | |
download | gitlab-ce-1d3815f89b9b9f5ecfd6dd15158a2988603b9ed8.tar.gz |
Allow projects to be started from a template
Started implementation for the first iteration of
gitlab-org/gitlab-ce#32420. This will allow users to select a template
to start with, instead of an empty repository in the project just
created.
Internally this is basically a small extension of the ImportExport
GitLab projects we already support. We just import a certain import
tar archive. This commits includes the first one: Ruby on Rails. In the
future more will be added.
Diffstat (limited to 'spec/features/projects_spec.rb')
-rw-r--r-- | spec/features/projects_spec.rb | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/spec/features/projects_spec.rb b/spec/features/projects_spec.rb index 10c7e5934e4..ab5042490ae 100644 --- a/spec/features/projects_spec.rb +++ b/spec/features/projects_spec.rb @@ -1,6 +1,27 @@ require 'spec_helper' feature 'Project', feature: true do + describe 'creating from template' do + let(:user) { create(:user) } + let(:template) { Gitlab::ProjectTemplate.find(:rails) } + + before do + sign_in user + visit new_project_path + end + + it "allows creation from the #{template.name} template" do + fill_in("project_template_title", with: template.title) + fill_in("project_path", with: template.name) + + page.within '#content-body' do + click_button "Create project" + end + + expect(page).to have_content 'Import' + end + end + describe 'description' do let(:project) { create(:project, :repository) } let(:path) { project_path(project) } |