@@ -36,9 +36,7 class LayoutTest < ActionDispatch::IntegrationTest | |||||
36 | end |
|
36 | end | |
37 |
|
37 | |||
38 | test "browsing to an unauthorized page should render the base layout" do |
|
38 | test "browsing to an unauthorized page should render the base layout" do | |
39 | change_user_password('miscuser9', 'test1234') |
|
39 | log_user('jsmith','jsmith') | |
40 |
|
||||
41 | log_user('miscuser9','test1234') |
|
|||
42 |
|
40 | |||
43 | get "/admin" |
|
41 | get "/admin" | |
44 | assert_response :forbidden |
|
42 | assert_response :forbidden |
@@ -132,12 +132,6 class ActiveSupport::TestCase | |||||
132 | ::I18n.locale = saved_localed |
|
132 | ::I18n.locale = saved_localed | |
133 | end |
|
133 | end | |
134 |
|
134 | |||
135 | def change_user_password(login, new_password) |
|
|||
136 | user = User.where(:login => login).first |
|
|||
137 | user.password, user.password_confirmation = new_password, new_password |
|
|||
138 | user.save! |
|
|||
139 | end |
|
|||
140 |
|
||||
141 | def self.ldap_configured? |
|
135 | def self.ldap_configured? | |
142 | @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389) |
|
136 | @test_ldap = Net::LDAP.new(:host => '127.0.0.1', :port => 389) | |
143 | return @test_ldap.bind |
|
137 | return @test_ldap.bind |
General Comments 0
You need to be logged in to leave comments.
Login now