Commit 38bf752f authored by tmaruyama's avatar tmaruyama

test: functional: wiki: add tests to show pdf (#401)

git-svn-id: https://svn.redmine.org/redmine/trunk@7742 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent cd6c10e8
......@@ -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'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment