@@ -13,9 +13,7 class LayoutTest < ActionController::IntegrationTest | |||||
13 | end |
|
13 | end | |
14 |
|
14 | |||
15 | test "browsing to an unauthorized page should render the base layout" do |
|
15 | test "browsing to an unauthorized page should render the base layout" do | |
16 | user = User.find(9) |
|
16 | change_user_password('miscuser9', 'test') | |
17 | user.password, user.password_confirmation = 'test', 'test' |
|
|||
18 | user.save! |
|
|||
19 |
|
17 | |||
20 | log_user('miscuser9','test') |
|
18 | log_user('miscuser9','test') | |
21 |
|
19 |
@@ -86,6 +86,12 class ActiveSupport::TestCase | |||||
86 | saved_settings.each {|k, v| Setting[k] = v} |
|
86 | saved_settings.each {|k, v| Setting[k] = v} | |
87 | end |
|
87 | end | |
88 |
|
88 | |||
|
89 | def change_user_password(login, new_password) | |||
|
90 | user = User.first(:conditions => {:login => login}) | |||
|
91 | user.password, user.password_confirmation = new_password, new_password | |||
|
92 | user.save! | |||
|
93 | end | |||
|
94 | ||||
89 | def self.ldap_configured? |
|
95 | def self.ldap_configured? | |
90 | @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389) |
|
96 | @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389) | |
91 | return @test_ldap.bind |
|
97 | return @test_ldap.bind |
General Comments 0
You need to be logged in to leave comments.
Login now