cover the issues pdf test in English and CJK locales
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7940 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0e2733a7cb
commit
88a713c719
|
@ -43,6 +43,8 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
:journal_details,
|
:journal_details,
|
||||||
:queries
|
:queries
|
||||||
|
|
||||||
|
include Redmine::I18n
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@controller = IssuesController.new
|
@controller = IssuesController.new
|
||||||
@request = ActionController::TestRequest.new
|
@request = ActionController::TestRequest.new
|
||||||
|
@ -379,6 +381,22 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_index_pdf
|
def test_index_pdf
|
||||||
|
["en", "zh", "zh-TW", "ja", "ko"].each do |lang|
|
||||||
|
with_settings :default_language => lang do
|
||||||
|
|
||||||
|
get :index
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'index'
|
||||||
|
|
||||||
|
if lang == "ja"
|
||||||
|
if RUBY_PLATFORM != 'java'
|
||||||
|
assert_equal "CP932", l(:general_pdf_encoding)
|
||||||
|
end
|
||||||
|
if RUBY_PLATFORM == 'java' && l(:general_pdf_encoding) == "CP932"
|
||||||
|
next
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
get :index, :format => 'pdf'
|
get :index, :format => 'pdf'
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_not_nil assigns(:issues)
|
assert_not_nil assigns(:issues)
|
||||||
|
@ -394,6 +412,8 @@ class IssuesControllerTest < ActionController::TestCase
|
||||||
assert_not_nil assigns(:issues)
|
assert_not_nil assigns(:issues)
|
||||||
assert_equal 'application/pdf', @response.content_type
|
assert_equal 'application/pdf', @response.content_type
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_index_pdf_with_query_grouped_by_list_custom_field
|
def test_index_pdf_with_query_grouped_by_list_custom_field
|
||||||
get :index, :project_id => 1, :query_id => 9, :format => 'pdf'
|
get :index, :project_id => 1, :query_id => 9, :format => 'pdf'
|
||||||
|
|
Loading…
Reference in New Issue