diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 0431bb198..9fe0b2dca 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -1425,12 +1425,17 @@ class IssuesControllerTest < ActionController::TestCase end def test_show_export_to_pdf_with_changesets - Issue.find(3).changesets = Changeset.find_all_by_id(100, 101, 102) - - get :show, :id => 3, :format => 'pdf' - assert_response :success - assert_equal 'application/pdf', @response.content_type - assert @response.body.starts_with?('%PDF') + [[100], [100, 101], [100, 101, 102]].each do |cs| + issue1 = Issue.find(3) + issue1.changesets = Changeset.find(cs) + issue1.save! + issue = Issue.find(3) + assert_equal issue.changesets.count, cs.size + get :show, :id => 3, :format => 'pdf' + assert_response :success + assert_equal 'application/pdf', @response.content_type + assert @response.body.starts_with?('%PDF') + end end def test_show_invalid_should_respond_with_404