Merged r3951 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4001 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
3e692a908b
commit
047bf692b3
|
@ -13,9 +13,7 @@ class LayoutTest < ActionController::IntegrationTest
|
||||||
end
|
end
|
||||||
|
|
||||||
test "browsing to an unauthorized page should render the base layout" do
|
test "browsing to an unauthorized page should render the base layout" do
|
||||||
user = User.find(9)
|
change_user_password('miscuser9', 'test')
|
||||||
user.password, user.password_confirmation = 'test', 'test'
|
|
||||||
user.save!
|
|
||||||
|
|
||||||
log_user('miscuser9','test')
|
log_user('miscuser9','test')
|
||||||
|
|
||||||
|
|
|
@ -86,6 +86,12 @@ class ActiveSupport::TestCase
|
||||||
saved_settings.each {|k, v| Setting[k] = v}
|
saved_settings.each {|k, v| Setting[k] = v}
|
||||||
end
|
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?
|
def self.ldap_configured?
|
||||||
@test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389)
|
@test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389)
|
||||||
return @test_ldap.bind
|
return @test_ldap.bind
|
||||||
|
|
Loading…
Reference in New Issue