From 7b6b147761a689aa07d83068e77348a3d3f84cfa Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Tue, 16 Feb 2010 16:40:50 +0000 Subject: Added some tests for the LDAP authentication. Includes an export of an LDAP database to use in testing. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3438 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/test_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/test_helper.rb') diff --git a/test/test_helper.rb b/test/test_helper.rb index 8e7927ab3..484678efc 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -76,6 +76,11 @@ class ActiveSupport::TestCase saved_settings.each {|k, v| Setting[k] = v} end + def self.ldap_configured? + @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389) + return @test_ldap.bind + end + # Shoulda macros def self.should_render_404 should_respond_with :not_found -- cgit v1.2.3