diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2018-02-05 14:26:25 +0300 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2018-02-05 14:29:02 +0300 |
commit | be26c4e728a2704d79a17df0edf84689b44eebd6 (patch) | |
tree | b422620fd9d036f6aa90959cd9a81b5ad1e433f6 /spec/models/project_wiki_spec.rb | |
parent | 19277271be890c1f836c38f2ccd5caa40c5765e2 (diff) |
Encode GitalyClient::WikiPage attributes to UTF-8
Diffstat (limited to 'spec/models/project_wiki_spec.rb')
-rw-r--r-- | spec/models/project_wiki_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/models/project_wiki_spec.rb b/spec/models/project_wiki_spec.rb index 929086305ba..1e7671476f1 100644 --- a/spec/models/project_wiki_spec.rb +++ b/spec/models/project_wiki_spec.rb @@ -127,7 +127,7 @@ describe ProjectWiki do end after do - destroy_page(subject.pages.first.page) + subject.pages.each { |page| destroy_page(page.page) } end it "returns the latest version of the page if it exists" do @@ -148,6 +148,17 @@ describe ProjectWiki do page = subject.find_page("index page") expect(page).to be_a WikiPage end + + context 'pages with multibyte-character title' do + before do + create_page("autre pagé", "C'est un génial Gollum Wiki") + end + + it "can find a page by slug" do + page = subject.find_page("autre pagé") + expect(page.title).to eq("autre pagé") + end + end end context 'when Gitaly wiki_find_page is enabled' do |