Remove all use of the :text option to render

It doesn't actually do what it says, as it sets the content type
to text/html not text/plain so is just confusing and as a result
has been deprecated in newer rails versions.
This commit is contained in:
Tom Hughes 2017-06-02 16:24:28 +01:00
parent 9b89d4eefe
commit ff97501ed0
17 changed files with 101 additions and 103 deletions

View file

@ -1122,7 +1122,7 @@ class UserControllerTest < ActionController::TestCase
basic_authorization(user.email, "test")
get :api_gpx_files
assert_response :success
assert_equal "text/xml", response.content_type
assert_equal "application/xml", response.content_type
# check the data that is returned
assert_select "gpx_file[id='#{trace1.id}']", 1 do

View file

@ -53,7 +53,7 @@ class UserPreferenceControllerTest < ActionController::TestCase
# try the read again
get :read
assert_response :success
assert_equal "text/xml", @response.content_type
assert_equal "application/xml", @response.content_type
assert_select "osm" do
assert_select "preferences", :count => 1 do
assert_select "preference", :count => 2