diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-07-31 11:22:46 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-11 12:18:07 +0200 |
commit | 8265d43d016d4bcd67ce1f7cb452a239953cf8bd (patch) | |
tree | 4b09eaa8b1f86e8503badf57584117b25489d8f1 /spec/helpers | |
parent | e794b561330070465a67ec57bc65069e12b78ef5 (diff) | |
download | gitlab-ce-8265d43d016d4bcd67ce1f7cb452a239953cf8bd.tar.gz |
Force of markup output to be the input encoding
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/application_helper_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb index 510b76fa9df..2db67cfdf95 100644 --- a/spec/helpers/application_helper_spec.rb +++ b/spec/helpers/application_helper_spec.rb @@ -217,4 +217,13 @@ describe ApplicationHelper do ).to eq("<a href=\"http://www.example.com\" rel=\"noreferrer nofollow\">Example</a>") end end + + describe 'markup_render' do + let(:content) { 'Noël' } + + it 'should preserve encoding' do + content.encoding.name.should == 'UTF-8' + expect(render_markup('foo.rst', content).encoding.name).to eq('UTF-8') + end + end end |