Create a named route for the preferences page and use it. Rename "crypt_token" to "generate_token".

git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@569 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
lukemelia 2007-07-17 04:47:35 +00:00
parent 08e5d6069d
commit 64321f5c46
8 changed files with 22 additions and 19 deletions

View file

@ -55,7 +55,7 @@ class UsersControllerTest < Test::Rails::TestCase
assert_response :success
assert_equal assigns['page_title'], "TRACKS::Change password"
post :update_password, :updateuser => {:password => 'newpassword', :password_confirmation => 'newpassword'}
assert_redirected_to :controller => 'preferences'
assert_redirected_to preferences_path
@updated_user = User.find(users(:admin_user).id)
assert_equal @updated_user.crypted_password, Digest::SHA1.hexdigest("#{Tracks::Config.salt}--newpassword--")
assert_equal "Password updated.", flash[:notice]