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)