summaryrefslogtreecommitdiffstats
path: root/test/unit/auth_source_ldap_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-26 08:42:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-02-26 08:42:40 +0000
commit899f06612a4768538bf23faf5e4b0f4377c6d399 (patch)
tree335772f6dcc3dbadfc31b4d5907967734be3c32a /test/unit/auth_source_ldap_test.rb
parent7ae53845ac48bd8b0a87bf8faff3e16742c37cfe (diff)
downloadredmine-899f06612a4768538bf23faf5e4b0f4377c6d399.tar.gz
redmine-899f06612a4768538bf23faf5e4b0f4377c6d399.zip
Moves the LDAP test server to a fixture.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3490 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/auth_source_ldap_test.rb')
-rw-r--r--test/unit/auth_source_ldap_test.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/test/unit/auth_source_ldap_test.rb b/test/unit/auth_source_ldap_test.rb
index d9f13ac82..bf868929e 100644
--- a/test/unit/auth_source_ldap_test.rb
+++ b/test/unit/auth_source_ldap_test.rb
@@ -18,7 +18,8 @@
require File.dirname(__FILE__) + '/../test_helper'
class AuthSourceLdapTest < ActiveSupport::TestCase
-
+ fixtures :auth_sources
+
def setup
end
@@ -37,16 +38,7 @@ class AuthSourceLdapTest < ActiveSupport::TestCase
if ldap_configured?
context '#authenticate' do
setup do
- @auth = AuthSourceLdap.generate!(:name => 'on the fly',
- :host => '127.0.0.1',
- :port => 389,
- :base_dn => 'OU=Person,DC=redmine,DC=org',
- :attr_login => 'uid',
- :attr_firstname => 'givenName',
- :attr_lastname => 'sn',
- :attr_mail => 'mail',
- :onthefly_register => true)
-
+ @auth = AuthSourceLdap.find(1)
end
context 'with a valid LDAP user' do