]> git.openstreetmap.org Git - rails.git/blobdiff - test/test_helper.rb
Added Accept header unit tests
[rails.git] / test / test_helper.rb
index 4d9372148f270cd447df619f1c438f2f4335b238..5b4d0d28f31b5c453cdc09ef4bb508caba347e66 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)