]> git.openstreetmap.org Git - rails.git/blobdiff - test/test_helper.rb
Merge pull request #2485 from mmd-osm/patch/json2
[rails.git] / test / test_helper.rb
index 378d49bb9a02f43097cfe13c9b73c32c702e1aac..08f01e8e7d488c21c2b9493ca74434b5a82516ee 100644 (file)
@@ -115,6 +115,12 @@ module ActiveSupport
       @request.env["HTTP_AUTHORIZATION"] = format("Basic %{auth}", :auth => Base64.encode64("#{user}:#{pass}"))
     end
 
+    ##
+    # set request header for HTTP Accept
+    def http_accept_format(format)
+      @request.env["HTTP_ACCEPT"] = format
+    end
+
     ##
     # set request readers to ask for a particular error format
     def error_format(format)