@@ -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,20 +381,38 class IssuesControllerTest < ActionController::TestCase | |||
|
379 | 381 | end |
|
380 | 382 | |
|
381 | 383 | def test_index_pdf |
|
382 | get :index, :format => 'pdf' | |
|
383 | assert_response :success | |
|
384 | assert_not_nil assigns(:issues) | |
|
385 | assert_equal 'application/pdf', @response.content_type | |
|
384 | ["en", "zh", "zh-TW", "ja", "ko"].each do |lang| | |
|
385 | with_settings :default_language => lang do | |
|
386 | 386 | |
|
387 | get :index, :project_id => 1, :format => 'pdf' | |
|
388 | assert_response :success | |
|
389 | assert_not_nil assigns(:issues) | |
|
390 | assert_equal 'application/pdf', @response.content_type | |
|
387 | get :index | |
|
388 | assert_response :success | |
|
389 | assert_template 'index' | |
|
391 | 390 | |
|
392 | get :index, :project_id => 1, :query_id => 6, :format => 'pdf' | |
|
393 | assert_response :success | |
|
394 | assert_not_nil assigns(:issues) | |
|
395 | assert_equal 'application/pdf', @response.content_type | |
|
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 | ||
|
400 | get :index, :format => 'pdf' | |
|
401 | assert_response :success | |
|
402 | assert_not_nil assigns(:issues) | |
|
403 | assert_equal 'application/pdf', @response.content_type | |
|
404 | ||
|
405 | get :index, :project_id => 1, :format => 'pdf' | |
|
406 | assert_response :success | |
|
407 | assert_not_nil assigns(:issues) | |
|
408 | assert_equal 'application/pdf', @response.content_type | |
|
409 | ||
|
410 | get :index, :project_id => 1, :query_id => 6, :format => 'pdf' | |
|
411 | assert_response :success | |
|
412 | assert_not_nil assigns(:issues) | |
|
413 | assert_equal 'application/pdf', @response.content_type | |
|
414 | end | |
|
415 | end | |
|
396 | 416 | end |
|
397 | 417 | |
|
398 | 418 | def test_index_pdf_with_query_grouped_by_list_custom_field |
General Comments 0
You need to be logged in to leave comments.
Login now