diff options
-rw-r--r-- | changelogs/unreleased/fix-template-project-visibility.yml | 5 | ||||
-rw-r--r-- | spec/services/projects/create_from_template_service_spec.rb | 8 |
2 files changed, 11 insertions, 2 deletions
diff --git a/changelogs/unreleased/fix-template-project-visibility.yml b/changelogs/unreleased/fix-template-project-visibility.yml new file mode 100644 index 00000000000..6576097822b --- /dev/null +++ b/changelogs/unreleased/fix-template-project-visibility.yml @@ -0,0 +1,5 @@ +--- +title: Respect description and visibility when creating project from template +merge_request: 16820 +author: George Tsiolis +type: fixed diff --git a/spec/services/projects/create_from_template_service_spec.rb b/spec/services/projects/create_from_template_service_spec.rb index 9919ec254c6..609d678caea 100644 --- a/spec/services/projects/create_from_template_service_spec.rb +++ b/spec/services/projects/create_from_template_service_spec.rb @@ -4,8 +4,10 @@ describe Projects::CreateFromTemplateService do let(:user) { create(:user) } let(:project_params) do { - path: user.to_param, - template_name: 'rails' + path: user.to_param, + template_name: 'rails', + description: 'project description', + visibility_level: Gitlab::VisibilityLevel::PRIVATE } end @@ -22,5 +24,7 @@ describe Projects::CreateFromTemplateService do expect(project).to be_saved expect(project.scheduled?).to be(true) + expect(project.description).to match('project description') + expect(project.visibility_level).to eq(Gitlab::VisibilityLevel::PRIVATE) end end |