Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-10-21 10:08:36 +0300
commit48aff82709769b098321c738f3444b9bdaa694c6 (patch)
treee00c7c43e2d9b603a5a6af576b1685e400410dee /spec/helpers/wiki_helper_spec.rb
parent879f5329ee916a948223f8f43d77fba4da6cd028 (diff)
Add latest changes from gitlab-org/gitlab@13-5-stable-eev13.5.0-rc42
Diffstat (limited to 'spec/helpers/wiki_helper_spec.rb')
-rw-r--r--spec/helpers/wiki_helper_spec.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/spec/helpers/wiki_helper_spec.rb b/spec/helpers/wiki_helper_spec.rb
index 65a52412f8c..45e1859893f 100644
--- a/spec/helpers/wiki_helper_spec.rb
+++ b/spec/helpers/wiki_helper_spec.rb
@@ -54,14 +54,18 @@ RSpec.describe WikiHelper do
end
describe '#wiki_attachment_upload_url' do
- it 'returns the upload endpoint for project wikis' do
- @wiki = build_stubbed(:project_wiki)
+ let_it_be(:wiki) { build_stubbed(:project_wiki) }
+
+ before do
+ @wiki = wiki
+ end
+ it 'returns the upload endpoint for project wikis' do
expect(helper.wiki_attachment_upload_url).to end_with("/api/v4/projects/#{@wiki.project.id}/wikis/attachments")
end
it 'raises an exception for unsupported wiki containers' do
- @wiki = Wiki.new(User.new)
+ allow(wiki).to receive(:container).and_return(User.new)
expect do
helper.wiki_attachment_upload_url
@@ -131,7 +135,8 @@ RSpec.describe WikiHelper do
'wiki-format' => :markdown,
'wiki-title-size' => 9,
'wiki-content-size' => 4,
- 'wiki-directory-nest-level' => 2
+ 'wiki-directory-nest-level' => 2,
+ 'wiki-container-type' => 'Project'
)
end