From 3758328d609e947270db53f7d285c25f2e414f4b Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Sun, 6 Nov 2011 10:50:05 +0000 Subject: [PATCH] test: functional: wiki: add tests to show pdf (#401) git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7742 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/functional/wiki_controller_test.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index 9247dfdb8..48db9e650 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -494,6 +494,16 @@ class WikiControllerTest < ActionController::TestCase assert_no_tag :tag => 'a', :attributes => { :href => '/projects/1/wiki/CookBook_documentation/edit' } end + def test_show_pdf + @request.session[:user_id] = 2 + get :show, :project_id => 1, :format => 'pdf' + assert_response :success + assert_not_nil assigns(:page) + assert_equal 'application/pdf', @response.content_type + assert_equal 'attachment; filename="CookBook_documentation.pdf"', + @response.headers['Content-Disposition'] + end + def test_show_html @request.session[:user_id] = 2 get :show, :project_id => 1, :format => 'html' -- 2.39.5