diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-09-11 13:46:38 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-09-11 13:46:38 +0000 |
commit | 3cba1e001246c019a60c8cae4965a0b2ed7acd2e (patch) | |
tree | 3cd494a42dabc1031a22aafc15e2fb516ce6bd88 /test | |
parent | 1612da75d1be4cbb8ee4bf340d61f8da5b341192 (diff) | |
download | redmine-3cba1e001246c019a60c8cae4965a0b2ed7acd2e.tar.gz redmine-3cba1e001246c019a60c8cae4965a0b2ed7acd2e.zip |
pdf: add test to export issue pdf with UTF-8 U+FFFD (#17826)
git-svn-id: http://svn.redmine.org/redmine/trunk@13368 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/issues_controller_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index e586e9bd1..104e27d44 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1405,6 +1405,22 @@ class IssuesControllerTest < ActionController::TestCase assert_not_nil assigns(:issue) end + def test_export_to_pdf_with_utf8_u_ffdd + # U+FFFD + s = "\xef\xbf\xbd" + s.force_encoding('UTF-8') if s.respond_to?(:force_encoding) + issue = Issue.generate!(:subject => s) + ["en", "zh", "zh-TW", "ja", "ko"].each do |lang| + with_settings :default_language => lang do + get :show, :id => issue.id, :format => 'pdf' + assert_response :success + assert_equal 'application/pdf', @response.content_type + assert @response.body.starts_with?('%PDF') + assert_not_nil assigns(:issue) + end + end + end + def test_show_export_to_pdf_with_ancestors issue = Issue.generate!(:project_id => 1, :author_id => 2, :tracker_id => 1, :subject => 'child', :parent_issue_id => 1) |