summaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-02 19:44:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-02 19:44:37 +0000
commit606ca39d101c559e1add4de23447c6c9132e0be6 (patch)
tree8f27cf00748e40736f3e7498a494b83415641605 /test/test_helper.rb
parentbbba385198cf7d704c6400d36b061dcd58becfec (diff)
downloadredmine-606ca39d101c559e1add4de23447c6c9132e0be6.tar.gz
redmine-606ca39d101c559e1add4de23447c6c9132e0be6.zip
Test cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8475 e93f8b46-1217-0410-a6f0-8f06a7374b81
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'