Move PDF stuff to a single helper.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2226 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2009-01-04 12:03:39 +00:00
parent dfc937340d
commit ceb2320ef0
8 changed files with 452 additions and 458 deletions
+10 -2
View File
@@ -177,16 +177,16 @@ class IssuesControllerTest < Test::Unit::TestCase
def test_gantt_export_to_pdf
get :gantt, :project_id => 1, :format => 'pdf'
assert_response :success
assert_template 'gantt.rfpdf'
assert_equal 'application/pdf', @response.content_type
assert @response.body.starts_with?('%PDF')
assert_not_nil assigns(:gantt)
end
def test_cross_project_gantt_export_to_pdf
get :gantt, :format => 'pdf'
assert_response :success
assert_template 'gantt.rfpdf'
assert_equal 'application/pdf', @response.content_type
assert @response.body.starts_with?('%PDF')
assert_not_nil assigns(:gantt)
end
@@ -252,6 +252,14 @@ class IssuesControllerTest < Test::Unit::TestCase
:content => /Notes/ } }
end
def test_show_export_to_pdf
get :show, :id => 1, :format => 'pdf'
assert_response :success
assert_equal 'application/pdf', @response.content_type
assert @response.body.starts_with?('%PDF')
assert_not_nil assigns(:issue)
end
def test_get_new
@request.session[:user_id] = 2
get :new, :project_id => 1, :tracker_id => 1