summaryrefslogtreecommitdiffstats
path: root/test/functional/wiki_controller_test.rb
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-01-27 03:54:25 +0000
committerGo MAEDA <maeda@farend.jp>2020-01-27 03:54:25 +0000
commitf37ed7766572550bd563632f69ad940717fa9b90 (patch)
tree6ca7069360504e61396f2c95d458853ff4c8fa39 /test/functional/wiki_controller_test.rb
parentd168df5c822f305cb510d072144c39f205b1bd3d (diff)
downloadredmine-f37ed7766572550bd563632f69ad940717fa9b90.tar.gz
redmine-f37ed7766572550bd563632f69ad940717fa9b90.zip
Use #media_type instead of #content_type to test the MIME type of a response (#32886).
Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@19467 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/wiki_controller_test.rb')
-rw-r--r--test/functional/wiki_controller_test.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb
index bb76f51e8..219d13317 100644
--- a/test/functional/wiki_controller_test.rb
+++ b/test/functional/wiki_controller_test.rb
@@ -1009,7 +1009,7 @@ class WikiControllerTest < Redmine::ControllerTest
get :export, :params => {:project_id => 'ecookbook'}
assert_response :success
- assert_equal "text/html", @response.content_type
+ assert_equal "text/html", @response.media_type
assert_select "a[name=?]", "CookBook_documentation"
assert_select "a[name=?]", "Another_page"
@@ -1021,7 +1021,7 @@ class WikiControllerTest < Redmine::ControllerTest
get :export, :params => {:project_id => 'ecookbook', :format => 'pdf'}
assert_response :success
- assert_equal 'application/pdf', @response.content_type
+ assert_equal 'application/pdf', @response.media_type
assert_equal 'attachment; filename="ecookbook.pdf"', @response.headers['Content-Disposition']
assert @response.body.starts_with?('%PDF')
end
@@ -1086,7 +1086,7 @@ class WikiControllerTest < Redmine::ControllerTest
get :show, :params => {:project_id => 1, :format => 'pdf'}
assert_response :success
- assert_equal 'application/pdf', @response.content_type
+ assert_equal 'application/pdf', @response.media_type
assert_equal 'attachment; filename="CookBook_documentation.pdf"',
@response.headers['Content-Disposition']
end
@@ -1096,7 +1096,7 @@ class WikiControllerTest < Redmine::ControllerTest
get :show, :params => {:project_id => 1, :format => 'html'}
assert_response :success
- assert_equal 'text/html', @response.content_type
+ assert_equal 'text/html', @response.media_type
assert_equal 'attachment; filename="CookBook_documentation.html"',
@response.headers['Content-Disposition']
assert_select 'h1', :text => /CookBook documentation/
@@ -1107,7 +1107,7 @@ class WikiControllerTest < Redmine::ControllerTest
get :show, :params => {:project_id => 1, :format => 'html', :version => 2}
assert_response :success
- assert_equal 'text/html', @response.content_type
+ assert_equal 'text/html', @response.media_type
assert_equal 'attachment; filename="CookBook_documentation.html"',
@response.headers['Content-Disposition']
assert_select 'h1', :text => /CookBook documentation v2/
@@ -1118,7 +1118,7 @@ class WikiControllerTest < Redmine::ControllerTest
get :show, :params => {:project_id => 1, :format => 'txt'}
assert_response :success
- assert_equal 'text/plain', @response.content_type
+ assert_equal 'text/plain', @response.media_type
assert_equal 'attachment; filename="CookBook_documentation.txt"',
@response.headers['Content-Disposition']
assert_include 'h1. CookBook documentation', @response.body
@@ -1129,7 +1129,7 @@ class WikiControllerTest < Redmine::ControllerTest
get :show, :params => {:project_id => 1, :format => 'txt', :version => 2}
assert_response :success
- assert_equal 'text/plain', @response.content_type
+ assert_equal 'text/plain', @response.media_type
assert_equal 'attachment; filename="CookBook_documentation.txt"',
@response.headers['Content-Disposition']
assert_include 'h1. CookBook documentation v2', @response.body