summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2018-02-28 12:06:51 +0200
committerValery Sizov <valery@gitlab.com>2018-02-28 12:06:51 +0200
commit86de1e291cb831ec3aca2fa7227626b93134f740 (patch)
tree43ef6cf0ab90012f648eda397b24c953bc7b57c9 /spec/services
parent4497f829d82dbe4cd6775555a60f986929e0b510 (diff)
downloadgitlab-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.rb11
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)