diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /spec/services/projects/create_service_spec.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'spec/services/projects/create_service_spec.rb')
-rw-r--r-- | spec/services/projects/create_service_spec.rb | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/spec/services/projects/create_service_spec.rb b/spec/services/projects/create_service_spec.rb index c3928563125..e15d9341fd1 100644 --- a/spec/services/projects/create_service_spec.rb +++ b/spec/services/projects/create_service_spec.rb @@ -86,7 +86,7 @@ RSpec.describe Projects::CreateService, '#execute' do subject(:project) { create_project(user, opts) } context "with 'topics' parameter" do - let(:opts) { { topics: 'topics' } } + let(:opts) { { name: 'topic-project', topics: 'topics' } } it 'keeps them as specified' do expect(project.topic_list).to eq(%w[topics]) @@ -94,7 +94,7 @@ RSpec.describe Projects::CreateService, '#execute' do end context "with 'topic_list' parameter" do - let(:opts) { { topic_list: 'topic_list' } } + let(:opts) { { name: 'topic-project', topic_list: 'topic_list' } } it 'keeps them as specified' do expect(project.topic_list).to eq(%w[topic_list]) @@ -102,7 +102,7 @@ RSpec.describe Projects::CreateService, '#execute' do end context "with 'tag_list' parameter (deprecated)" do - let(:opts) { { tag_list: 'tag_list' } } + let(:opts) { { name: 'topic-project', tag_list: 'tag_list' } } it 'keeps them as specified' do expect(project.topic_list).to eq(%w[tag_list]) @@ -346,6 +346,12 @@ RSpec.describe Projects::CreateService, '#execute' do expect(imported_project.import_data.data).to eq(import_data[:data]) expect(imported_project.import_url).to eq('http://import-url') end + + it 'tracks for the combined_registration experiment', :experiment do + expect(experiment(:combined_registration)).to track(:import_project).on_next_instance + + imported_project + end end context 'builds_enabled global setting' do @@ -601,6 +607,18 @@ RSpec.describe Projects::CreateService, '#execute' do MARKDOWN end end + + context 'and readme_template is specified' do + before do + opts[:readme_template] = "# GitLab\nThis is customized template." + end + + it_behaves_like 'creates README.md' + + it 'creates README.md with specified template' do + expect(project.repository.readme.data).to include('This is customized template.') + end + end end end |