diff options
author | George Tsiolis <tsiolis.g@gmail.com> | 2018-02-14 13:50:28 +0200 |
---|---|---|
committer | George Tsiolis <tsiolis.g@gmail.com> | 2018-02-14 14:03:34 +0200 |
commit | b5db95624d8e0bc8c60d3ce82ef0bd8619c6064f (patch) | |
tree | 2c27739ad2db356880551c4d204c55450b16b0bf | |
parent | 84e7654c1afe9d42c1d96a4b79d49e450d8373eb (diff) | |
download | gitlab-ce-b5db95624d8e0bc8c60d3ce82ef0bd8619c6064f.tar.gz |
Add description, visibility to CreateFromTemplateService spec
-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 |