]> git.openstreetmap.org Git - rails.git/blobdiff - test/controllers/traces_controller_test.rb
Make the back button link to the inbox when reading received messages
[rails.git] / test / controllers / traces_controller_test.rb
index 84a6557946eb598d6be0e1a1d2de212bfbd32148..45b0358f5f957538ff2bd0b77ade2cf0a088810a 100644 (file)
@@ -681,7 +681,7 @@ class TracesControllerTest < ActionController::TestCase
   def check_trace_feed(traces)
     assert_response :success
     assert_template "georss"
-    assert_equal "application/rss+xml", @response.content_type
+    assert_equal "application/rss+xml", @response.media_type
     assert_select "rss", :count => 1 do
       assert_select "channel", :count => 1 do
         assert_select "title"
@@ -736,19 +736,19 @@ class TracesControllerTest < ActionController::TestCase
   def check_trace_data(trace, digest, content_type = "application/gpx+xml", extension = "gpx")
     assert_response :success
     assert_equal digest, Digest::MD5.hexdigest(response.body)
-    assert_equal content_type, response.content_type
-    assert_equal "attachment; filename=\"#{trace.id}.#{extension}\"", @response.header["Content-Disposition"]
+    assert_equal content_type, response.media_type
+    assert_equal "attachment; filename=\"#{trace.id}.#{extension}\"; filename*=UTF-8''#{trace.id}.#{extension}", @response.header["Content-Disposition"]
   end
 
   def check_trace_picture(trace)
     assert_response :success
-    assert_equal "image/gif", response.content_type
+    assert_equal "image/gif", response.media_type
     assert_equal trace.large_picture, response.body
   end
 
   def check_trace_icon(trace)
     assert_response :success
-    assert_equal "image/gif", response.content_type
+    assert_equal "image/gif", response.media_type
     assert_equal trace.icon_picture, response.body
   end
 end