@@ -43,6 +43,8 class IssuesControllerTest < ActionController::TestCase | |||
|
43 | 43 | :journal_details, |
|
44 | 44 | :queries |
|
45 | 45 | |
|
46 | include Redmine::I18n | |
|
47 | ||
|
46 | 48 | def setup |
|
47 | 49 | @controller = IssuesController.new |
|
48 | 50 | @request = ActionController::TestRequest.new |
@@ -379,6 +381,22 class IssuesControllerTest < ActionController::TestCase | |||
|
379 | 381 | end |
|
380 | 382 | |
|
381 | 383 | def test_index_pdf |
|
384 | ["en", "zh", "zh-TW", "ja", "ko"].each do |lang| | |
|
385 | with_settings :default_language => lang do | |
|
386 | ||
|
387 | get :index | |
|
388 | assert_response :success | |
|
389 | assert_template 'index' | |
|
390 | ||
|
391 | if lang == "ja" | |
|
392 | if RUBY_PLATFORM != 'java' | |
|
393 | assert_equal "CP932", l(:general_pdf_encoding) | |
|
394 | end | |
|
395 | if RUBY_PLATFORM == 'java' && l(:general_pdf_encoding) == "CP932" | |
|
396 | next | |
|
397 | end | |
|
398 | end | |
|
399 | ||
|
382 | 400 | get :index, :format => 'pdf' |
|
383 | 401 | assert_response :success |
|
384 | 402 | assert_not_nil assigns(:issues) |
@@ -394,6 +412,8 class IssuesControllerTest < ActionController::TestCase | |||
|
394 | 412 | assert_not_nil assigns(:issues) |
|
395 | 413 | assert_equal 'application/pdf', @response.content_type |
|
396 | 414 | end |
|
415 | end | |
|
416 | end | |
|
397 | 417 | |
|
398 | 418 | def test_index_pdf_with_query_grouped_by_list_custom_field |
|
399 | 419 | get :index, :project_id => 1, :query_id => 9, :format => 'pdf' |
General Comments 0
You need to be logged in to leave comments.
Login now