@@ -494,6 +494,16 class WikiControllerTest < ActionController::TestCase | |||||
494 | assert_no_tag :tag => 'a', :attributes => { :href => '/projects/1/wiki/CookBook_documentation/edit' } |
|
494 | assert_no_tag :tag => 'a', :attributes => { :href => '/projects/1/wiki/CookBook_documentation/edit' } | |
495 | end |
|
495 | end | |
496 |
|
496 | |||
|
497 | def test_show_pdf | |||
|
498 | @request.session[:user_id] = 2 | |||
|
499 | get :show, :project_id => 1, :format => 'pdf' | |||
|
500 | assert_response :success | |||
|
501 | assert_not_nil assigns(:page) | |||
|
502 | assert_equal 'application/pdf', @response.content_type | |||
|
503 | assert_equal 'attachment; filename="CookBook_documentation.pdf"', | |||
|
504 | @response.headers['Content-Disposition'] | |||
|
505 | end | |||
|
506 | ||||
497 | def test_show_html |
|
507 | def test_show_html | |
498 | @request.session[:user_id] = 2 |
|
508 | @request.session[:user_id] = 2 | |
499 | get :show, :project_id => 1, :format => 'html' |
|
509 | get :show, :project_id => 1, :format => 'html' |
General Comments 0
You need to be logged in to leave comments.
Login now