@@ -1425,12 +1425,17 class IssuesControllerTest < ActionController::TestCase | |||
|
1425 | 1425 | end |
|
1426 | 1426 | |
|
1427 | 1427 | def test_show_export_to_pdf_with_changesets |
|
1428 | Issue.find(3).changesets = Changeset.find_all_by_id(100, 101, 102) | |
|
1429 | ||
|
1430 | get :show, :id => 3, :format => 'pdf' | |
|
1431 | assert_response :success | |
|
1432 | assert_equal 'application/pdf', @response.content_type | |
|
1433 | assert @response.body.starts_with?('%PDF') | |
|
1428 | [[100], [100, 101], [100, 101, 102]].each do |cs| | |
|
1429 | issue1 = Issue.find(3) | |
|
1430 | issue1.changesets = Changeset.find(cs) | |
|
1431 | issue1.save! | |
|
1432 | issue = Issue.find(3) | |
|
1433 | assert_equal issue.changesets.count, cs.size | |
|
1434 | get :show, :id => 3, :format => 'pdf' | |
|
1435 | assert_response :success | |
|
1436 | assert_equal 'application/pdf', @response.content_type | |
|
1437 | assert @response.body.starts_with?('%PDF') | |
|
1438 | end | |
|
1434 | 1439 | end |
|
1435 | 1440 | |
|
1436 | 1441 | def test_show_invalid_should_respond_with_404 |
General Comments 0
You need to be logged in to leave comments.
Login now