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