##// END OF EJS Templates
cover the issues pdf test in English and CJK locales...
Toshi MARUYAMA -
r7820:88a713c719c7
parent child
Show More
@@ -43,6 +43,8 class IssuesControllerTest < ActionController::TestCase
43 :journal_details,
43 :journal_details,
44 :queries
44 :queries
45
45
46 include Redmine::I18n
47
46 def setup
48 def setup
47 @controller = IssuesController.new
49 @controller = IssuesController.new
48 @request = ActionController::TestRequest.new
50 @request = ActionController::TestRequest.new
@@ -379,20 +381,38 class IssuesControllerTest < ActionController::TestCase
379 end
381 end
380
382
381 def test_index_pdf
383 def test_index_pdf
382 get :index, :format => 'pdf'
384 ["en", "zh", "zh-TW", "ja", "ko"].each do |lang|
383 assert_response :success
385 with_settings :default_language => lang do
384 assert_not_nil assigns(:issues)
385 assert_equal 'application/pdf', @response.content_type
386
386
387 get :index, :project_id => 1, :format => 'pdf'
387 get :index
388 assert_response :success
388 assert_response :success
389 assert_not_nil assigns(:issues)
389 assert_template 'index'
390 assert_equal 'application/pdf', @response.content_type
391
390
392 get :index, :project_id => 1, :query_id => 6, :format => 'pdf'
391 if lang == "ja"
393 assert_response :success
392 if RUBY_PLATFORM != 'java'
394 assert_not_nil assigns(:issues)
393 assert_equal "CP932", l(:general_pdf_encoding)
395 assert_equal 'application/pdf', @response.content_type
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 end
416 end
397
417
398 def test_index_pdf_with_query_grouped_by_list_custom_field
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