diff options
author | Valery Sizov <valery@gitlab.com> | 2018-02-28 12:06:51 +0200 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2018-02-28 12:06:51 +0200 |
commit | 86de1e291cb831ec3aca2fa7227626b93134f740 (patch) | |
tree | 43ef6cf0ab90012f648eda397b24c953bc7b57c9 /spec/services | |
parent | 4497f829d82dbe4cd6775555a60f986929e0b510 (diff) | |
download | gitlab-ce-86de1e291cb831ec3aca2fa7227626b93134f740.tar.gz |
Add spec to prove that we don't create wiki when we update project's name4826-create-empty-wiki-when-it-s-enabled
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/projects/update_service_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/services/projects/update_service_spec.rb b/spec/services/projects/update_service_spec.rb index da42bba6f10..ad5a289290c 100644 --- a/spec/services/projects/update_service_spec.rb +++ b/spec/services/projects/update_service_spec.rb @@ -123,6 +123,17 @@ describe Projects::UpdateService do end end + context 'when we update project but not enabling a wiki' do + it 'does not try to create an empty wiki' do + FileUtils.rm_rf(project.wiki.repository.path) + + result = update_project(project, user, { name: 'test1' }) + + expect(result).to eq({ status: :success }) + expect(project.wiki_repository_exists?).to be false + end + end + context 'when enabling a wiki' do it 'creates a wiki' do project.project_feature.update(wiki_access_level: ProjectFeature::DISABLED) |