##// END OF EJS Templates
Code cleanup....
Jean-Philippe Lang -
r9758:6adf61fd02e5
parent child
Show More
@@ -2,14 +2,19
2
2
3 <%= error_messages_for 'user' %>
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 <div class="box tabular">
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 <%= password_field_tag 'new_password', nil, :size => 25 %>
10 <%= password_field_tag 'new_password', nil, :size => 25 %>
9 <em class="info"><%= l(:text_caracters_minimum, :count => Setting.password_min_length) %></em></p>
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>
14 <p>
12 <%= password_field_tag 'new_password_confirmation', nil, :size => 25 %></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 </div>
18 </div>
14 <p><%= submit_tag l(:button_save) %></p>
19 <p><%= submit_tag l(:button_save) %></p>
15 <% end %>
20 <% end %>
@@ -76,6 +76,7 class AccountTest < ActionController::IntegrationTest
76 get "account/lost_password"
76 get "account/lost_password"
77 assert_response :success
77 assert_response :success
78 assert_template "account/lost_password"
78 assert_template "account/lost_password"
79 assert_select 'input[name=mail]'
79
80
80 post "account/lost_password", :mail => 'jSmith@somenet.foo'
81 post "account/lost_password", :mail => 'jSmith@somenet.foo'
81 assert_redirected_to "/login"
82 assert_redirected_to "/login"
@@ -88,6 +89,9 class AccountTest < ActionController::IntegrationTest
88 get "account/lost_password", :token => token.value
89 get "account/lost_password", :token => token.value
89 assert_response :success
90 assert_response :success
90 assert_template "account/password_recovery"
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 post "account/lost_password", :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'newpass'
96 post "account/lost_password", :token => token.value, :new_password => 'newpass', :new_password_confirmation => 'newpass'
93 assert_redirected_to "/login"
97 assert_redirected_to "/login"
General Comments 0
You need to be logged in to leave comments. Login now