<td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
<td class="buttons">
<%= change_status_link(user) %>
- <%= delete_link user_path(user) unless User.current == user %>
+ <%= delete_link user_path(user, :back_url => users_path(params)) unless User.current == user %>
</td>
</tr>
<% end -%>
assert_response 403
end
+ def test_destroy_should_redirect_to_back_url_param
+ assert_difference 'User.count', -1 do
+ delete :destroy, :id => 2, :back_url => '/users?name=foo'
+ end
+ assert_redirected_to '/users?name=foo'
+ end
+
def test_create_membership
assert_difference 'Member.count' do
post :edit_membership, :id => 7, :membership => { :project_id => 3, :role_ids => [2]}