diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-06-18 11:18:50 +0000 |
commit | 8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781 (patch) | |
tree | a77e7fe7a93de11213032ed4ab1f33a3db51b738 /spec/models/wiki_page_spec.rb | |
parent | 00b35af3db1abfe813a778f643dad221aad51fca (diff) | |
download | gitlab-ce-8c7f4e9d5f36cff46365a7f8c4b9c21578c1e781.tar.gz |
Add latest changes from gitlab-org/gitlab@13-1-stable-ee
Diffstat (limited to 'spec/models/wiki_page_spec.rb')
-rw-r--r-- | spec/models/wiki_page_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/models/wiki_page_spec.rb b/spec/models/wiki_page_spec.rb index 201dc85daf8..8f2da8ff9a1 100644 --- a/spec/models/wiki_page_spec.rb +++ b/spec/models/wiki_page_spec.rb @@ -651,6 +651,7 @@ describe WikiPage do let(:untitled_page) { described_class.new(wiki) } let(:directory_page) { create(:wiki_page, title: 'parent directory/child page') } + let(:page_with_special_characters) { create(:wiki_page, title: 'test+page') } where(:page, :title, :changed) do :untitled_page | nil | false @@ -658,6 +659,8 @@ describe WikiPage do :new_page | nil | true :new_page | 'test page' | true + :new_page | 'test-page' | true + :new_page | 'test+page' | true :new_page | 'new title' | true :existing_page | nil | false @@ -665,6 +668,7 @@ describe WikiPage do :existing_page | 'test-page' | false :existing_page | '/test page' | false :existing_page | '/test-page' | false + :existing_page | 'test+page' | true :existing_page | ' test page ' | true :existing_page | 'new title' | true :existing_page | 'new-title' | true @@ -681,6 +685,11 @@ describe WikiPage do :directory_page | 'parent-directory / child-page' | true :directory_page | 'other directory/child page' | true :directory_page | 'other-directory/child page' | true + + :page_with_special_characters | nil | false + :page_with_special_characters | 'test+page' | false + :page_with_special_characters | 'test-page' | true + :page_with_special_characters | 'test page' | true end with_them do @@ -772,7 +781,7 @@ describe WikiPage do describe '#to_partial_path' do it 'returns the relative path to the partial to be used' do - expect(subject.to_partial_path).to eq('projects/wikis/wiki_page') + expect(subject.to_partial_path).to eq('../shared/wikis/wiki_page') end end |