fix find_all_by_id(n1, n2) parameter at test_show_export_to_pdf_with_changesets of IssuesControllerTest
find_all_by_id(n1, n2) returns only n1 result. git-svn-id: http://svn.redmine.org/redmine/trunk@12467 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
9c8e00057e
commit
8ec6004a7f
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue