##// END OF EJS Templates
Small test refactoring, extract method....
Eric Davis -
r3837:fc6e7f12b70e
parent child
Show More
@@ -13,9 +13,7 class LayoutTest < ActionController::IntegrationTest
13 13 end
14 14
15 15 test "browsing to an unauthorized page should render the base layout" do
16 user = User.find(9)
17 user.password, user.password_confirmation = 'test', 'test'
18 user.save!
16 change_user_password('miscuser9', 'test')
19 17
20 18 log_user('miscuser9','test')
21 19
@@ -86,6 +86,12 class ActiveSupport::TestCase
86 86 saved_settings.each {|k, v| Setting[k] = v}
87 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 95 def self.ldap_configured?
90 96 @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389)
91 97 return @test_ldap.bind
General Comments 0
You need to be logged in to leave comments. Login now