Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9941 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
986ffb2434
commit
6adf61fd02
|
@ -2,14 +2,19 @@
|
||||||
|
|
||||||
<%= error_messages_for 'user' %>
|
<%= error_messages_for 'user' %>
|
||||||
|
|
||||||
<%= form_tag({:token => @token.value}) do %>
|
<%= form_tag(lost_password_path) do %>
|
||||||
<div class="box tabular">
|
<%= hidden_field_tag 'token', @token.value %>
|
||||||
<p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
<div class="box tabular">
|
||||||
<%= password_field_tag 'new_password', nil, :size => 25 %>
|
<p>
|
||||||
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
|
<label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label>
|
||||||
|
<%= password_field_tag 'new_password', nil, :size => 25 %>
|
||||||
|
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em>
|
||||||
|
</p>
|
||||||
|
|
||||||
<p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
|
<p>
|
||||||
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p>
|
<label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label>
|
||||||
</div>
|
<%= password_field_tag 'new_password_confirmation', nil, :size => 25 %>
|
||||||
<p><%= submit_tag l(:button_save) %></p>
|
</p>
|
||||||
|
</div>
|
||||||
|
<p><%= submit_tag l(:button_save) %></p>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -76,6 +76,7 @@ class AccountTest < ActionController::IntegrationTest
|
||||||
get "account/lost_password"
|
get "account/lost_password"
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template "account/lost_password"
|
assert_template "account/lost_password"
|
||||||
|
assert_select 'input[name=mail]'
|
||||||
|
|
||||||
post "account/lost_password", :mail => 'jSmith@somenet.foo'
|
post "account/lost_password", :mail => 'jSmith@somenet.foo'
|
||||||
assert_redirected_to "/login"
|
assert_redirected_to "/login"
|
||||||
|
@ -88,6 +89,9 @@ class AccountTest < ActionController::IntegrationTest
|
||||||
get "account/lost_password", :token => token.value
|
get "account/lost_password", :token => token.value
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_template "account/password_recovery"
|
assert_template "account/password_recovery"
|
||||||
|
assert_select 'input[type=hidden][name=token][value=?]', token.value
|
||||||
|
assert_select 'input[name=new_password]'
|
||||||
|
assert_select 'input[name=new_password_confirmation]'
|
||||||
|
|
||||||
post "account/lost_password", :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'newpass'
|
post "account/lost_password", :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'newpass'
|
||||||
assert_redirected_to "/login"
|
assert_redirected_to "/login"
|
||||||
|
|
Loading…
Reference in New Issue