diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-19 01:28:33 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-08-19 01:28:33 +0000 |
commit | fc6e7f12b70ee716eb762d112acd43467466b2ae (patch) | |
tree | 944dcf267a46faacebc1fcebe165de2f13dce3b2 /test/test_helper.rb | |
parent | a256e4b1dc76b969ac593f9b5b9c39703820c297 (diff) | |
download | redmine-fc6e7f12b70ee716eb762d112acd43467466b2ae.tar.gz redmine-fc6e7f12b70ee716eb762d112acd43467466b2ae.zip |
Small test refactoring, extract method.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3951 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 15a1f1570..dc04fa82d 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -86,6 +86,12 @@ class ActiveSupport::TestCase saved_settings.each {|k, v| Setting[k] = v} end + def change_user_password(login, new_password) + user = User.first(:conditions => {:login => login}) + user.password, user.password_confirmation = new_password, new_password + user.save! + end + def self.ldap_configured? @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389) return @test_ldap.bind |