Improving the not found handling of preferences. adding a user preference test. addin...
[rails.git] / test / test_helper.rb
index ea6e91abe5ce25f79efb55892c8acea85cb9b468..88a6fbe4ac9ad139f549f5bb19c6d42bee7d083b 100644 (file)
@@ -106,5 +106,13 @@ class Test::Unit::TestCase
     assert_equal a.tags, b.tags, "tags on node #{a.id}"
   end
 
+  def basic_authorization(user, pass)
+    @request.env["HTTP_AUTHORIZATION"] = "Basic %s" % Base64.encode64("#{user}:#{pass}")
+  end
+
+  def content(c)
+    @request.env["RAW_POST_DATA"] = c.to_s
+  end
+
   # Add more helper methods to be used by all tests here...
 end