summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 2fa726ad5..c0947efc3 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -62,6 +62,10 @@ class ActiveSupport::TestCase
ActiveSupport::TestCase.fixture_path + "/files/#{name}", mime, true)
end
+ def credentials(user, password=nil)
+ ActionController::HttpAuthentication::Basic.encode_credentials(user, password || user)
+ end
+
# Mock out a file
def self.mock_file
file = 'a_file.png'