@@ -2,14 +2,19 | |||
|
2 | 2 | |
|
3 | 3 | <%= error_messages_for 'user' %> |
|
4 | 4 | |
|
5 | <%= form_tag({:token => @token.value}) do %> | |
|
5 | <%= form_tag(lost_password_path) do %> | |
|
6 | <%= hidden_field_tag 'token', @token.value %> | |
|
6 | 7 | <div class="box tabular"> |
|
7 | <p><label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label> | |
|
8 | <p> | |
|
9 | <label for="new_password"><%=l(:field_new_password)%> <span class="required">*</span></label> | |
|
8 | 10 | <%= password_field_tag 'new_password', nil, :size => 25 %> |
|
9 |
<em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em> |
|
|
11 | <em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em> | |
|
12 | </p> | |
|
10 | 13 | |
|
11 | <p><label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label> | |
|
12 | <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></p> | |
|
14 | <p> | |
|
15 | <label for="new_password_confirmation"><%=l(:field_password_confirmation)%> <span class="required">*</span></label> | |
|
16 | <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %> | |
|
17 | </p> | |
|
13 | 18 | </div> |
|
14 | 19 | <p><%= submit_tag l(:button_save) %></p> |
|
15 | 20 | <% end %> |
@@ -76,6 +76,7 class AccountTest < ActionController::IntegrationTest | |||
|
76 | 76 | get "account/lost_password" |
|
77 | 77 | assert_response :success |
|
78 | 78 | assert_template "account/lost_password" |
|
79 | assert_select 'input[name=mail]' | |
|
79 | 80 | |
|
80 | 81 | post "account/lost_password", :mail => 'jSmith@somenet.foo' |
|
81 | 82 | assert_redirected_to "/login" |
@@ -88,6 +89,9 class AccountTest < ActionController::IntegrationTest | |||
|
88 | 89 | get "account/lost_password", :token => token.value |
|
89 | 90 | assert_response :success |
|
90 | 91 | assert_template "account/password_recovery" |
|
92 | assert_select 'input[type=hidden][name=token][value=?]', token.value | |
|
93 | assert_select 'input[name=new_password]' | |
|
94 | assert_select 'input[name=new_password_confirmation]' | |
|
91 | 95 | |
|
92 | 96 | post "account/lost_password", :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'newpass' |
|
93 | 97 | assert_redirected_to "/login" |
General Comments 0
You need to be logged in to leave comments.
Login now