@@ -494,6 +494,26 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_html | |||
|
498 | @request.session[:user_id] = 2 | |||
|
499 | get :show, :project_id => 1, :format => 'html' | |||
|
500 | assert_response :success | |||
|
501 | assert_not_nil assigns(:page) | |||
|
502 | assert_equal 'text/html', @response.content_type | |||
|
503 | assert_equal 'attachment; filename="CookBook_documentation.html"', | |||
|
504 | @response.headers['Content-Disposition'] | |||
|
505 | end | |||
|
506 | ||||
|
507 | def test_show_txt | |||
|
508 | @request.session[:user_id] = 2 | |||
|
509 | get :show, :project_id => 1, :format => 'txt' | |||
|
510 | assert_response :success | |||
|
511 | assert_not_nil assigns(:page) | |||
|
512 | assert_equal 'text/plain', @response.content_type | |||
|
513 | assert_equal 'attachment; filename="CookBook_documentation.txt"', | |||
|
514 | @response.headers['Content-Disposition'] | |||
|
515 | end | |||
|
516 | ||||
497 | def test_edit_unprotected_page |
|
517 | def test_edit_unprotected_page | |
498 | # Non members can edit unprotected wiki pages |
|
518 | # Non members can edit unprotected wiki pages | |
499 | @request.session[:user_id] = 4 |
|
519 | @request.session[:user_id] = 4 |
General Comments 0
You need to be logged in to leave comments.
Login now