mirror of
https://github.com/meineerde/redmine.git
synced 2026-01-02 05:39:40 +00:00
cleanup: rubocop: fix Layout/AlignArguments in test/functional/wiki_controller_test.rb
git-svn-id: http://svn.redmine.org/redmine/trunk@18949 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
4810d5f5c4
commit
2efe9dc610
@ -36,7 +36,7 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
assert_select 'h1', :text => /CookBook documentation/
|
||||
# child_pages macro
|
||||
assert_select 'ul.pages-hierarchy>li>a[href=?]', '/projects/ecookbook/wiki/Page_with_an_inline_image',
|
||||
:text => 'Page with an inline image'
|
||||
:text => 'Page with an inline image'
|
||||
end
|
||||
|
||||
def test_export_link
|
||||
@ -314,11 +314,9 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
def test_edit_page
|
||||
@request.session[:user_id] = 2
|
||||
get :edit, :params => {:project_id => 'ecookbook', :id => 'Another_page'}
|
||||
|
||||
assert_response :success
|
||||
|
||||
assert_select 'textarea[name=?]', 'content[text]',
|
||||
:text => WikiPage.find_by_title('Another_page').content.text
|
||||
:text => WikiPage.find_by_title('Another_page').content.text
|
||||
end
|
||||
|
||||
def test_edit_section
|
||||
@ -1088,7 +1086,7 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
|
||||
assert_equal 'application/pdf', @response.content_type
|
||||
assert_equal 'attachment; filename="CookBook_documentation.pdf"',
|
||||
@response.headers['Content-Disposition']
|
||||
@response.headers['Content-Disposition']
|
||||
end
|
||||
|
||||
def test_show_html
|
||||
@ -1098,7 +1096,7 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
|
||||
assert_equal 'text/html', @response.content_type
|
||||
assert_equal 'attachment; filename="CookBook_documentation.html"',
|
||||
@response.headers['Content-Disposition']
|
||||
@response.headers['Content-Disposition']
|
||||
assert_select 'h1', :text => /CookBook documentation/
|
||||
end
|
||||
|
||||
@ -1109,7 +1107,7 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
|
||||
assert_equal 'text/html', @response.content_type
|
||||
assert_equal 'attachment; filename="CookBook_documentation.html"',
|
||||
@response.headers['Content-Disposition']
|
||||
@response.headers['Content-Disposition']
|
||||
assert_select 'h1', :text => /CookBook documentation v2/
|
||||
end
|
||||
|
||||
@ -1120,7 +1118,7 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
|
||||
assert_equal 'text/plain', @response.content_type
|
||||
assert_equal 'attachment; filename="CookBook_documentation.txt"',
|
||||
@response.headers['Content-Disposition']
|
||||
@response.headers['Content-Disposition']
|
||||
assert_include 'h1. CookBook documentation', @response.body
|
||||
end
|
||||
|
||||
@ -1131,7 +1129,7 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
|
||||
assert_equal 'text/plain', @response.content_type
|
||||
assert_equal 'attachment; filename="CookBook_documentation.txt"',
|
||||
@response.headers['Content-Disposition']
|
||||
@response.headers['Content-Disposition']
|
||||
assert_include 'h1. CookBook documentation v2', @response.body
|
||||
end
|
||||
|
||||
@ -1144,14 +1142,14 @@ class WikiControllerTest < Redmine::ControllerTest
|
||||
get :show, :params => {:project_id => 1, :id => title, :format => format}
|
||||
assert_response :success
|
||||
assert_equal "attachment; filename=\"#{title}.#{format}\"",
|
||||
@response.headers['Content-Disposition']
|
||||
@response.headers['Content-Disposition']
|
||||
# Microsoft's browsers: filename should be URI encoded
|
||||
@request.user_agent = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063'
|
||||
get :show, :params => {:project_id => 1, :id => title, :format => format}
|
||||
assert_response :success
|
||||
filename = URI.encode("#{title}.#{format}")
|
||||
assert_equal "attachment; filename=\"#{filename}\"",
|
||||
@response.headers['Content-Disposition']
|
||||
@response.headers['Content-Disposition']
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user