diff options
author | Robert Speicher <robert@gitlab.com> | 2018-05-10 17:47:04 +0300 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-05-10 19:39:49 +0300 |
commit | bd581a35c204444344b611cea33fbf6273feeaa8 (patch) | |
tree | f8c2ba14be41e182bb4d25c6c4162dfccf811944 /spec | |
parent | 6657e65dd1470fdcb92870fcd9711fa220d1e0a5 (diff) |
Merge branch 'fix/wiki-find-page-invalid-encoding' into 'master'
Fix finding wiki pages when they have invalidly-encoded content
Closes #43715
See merge request gitlab-org/gitlab-ce!18856
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/project_wiki_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb index d6c4031329d..f1142832f1a 100644 --- a/spec/models/project_wiki_spec.rb +++ b/spec/models/project_wiki_spec.rb @@ -159,6 +159,17 @@ describe ProjectWiki do expect(page.title).to eq("autre pagé") end end + + context 'pages with invalidly-encoded content' do + before do + create_page("encoding is fun", "f\xFCr".b) + end + + it "can find the page" do + page = subject.find_page("encoding is fun") + expect(page.content).to eq("fr") + end + end end context 'when Gitaly wiki_find_page is enabled' do |