Commit de765b0f1a4dd4e8d202880f1320d1cad9b39b8e

Authored by MoisesMachado
1 parent e8d6d9a6

ActionItem114: changed the redirection of the login to the myprofile page and fixed the tests for it

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@867 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/controllers/public/account_controller.rb
... ... @@ -20,8 +20,7 @@ class AccountController < PublicController
20 20 self.current_user.remember_me
21 21 cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at }
22 22 end
23   -# redirect_back_or_default(:controller => '/account', :action => 'index')
24   - redirect_back_or_default(homepage_path(:profile => current_user.login))
  23 + redirect_back_or_default(myprofile_path(:controller => 'profile_editor', :profile => current_user.login))
25 24 flash[:notice] = _("Logged in successfully")
26 25 else
27 26 flash[:notice] = _('Incorrect username or password')
... ...
test/test_helper.rb
... ... @@ -91,6 +91,6 @@ class ActionController::IntegrationTest
91 91 post '/account/login', :login => username, :password => password
92 92 assert_response :redirect
93 93 follow_redirect!
94   - assert_equal '/account', path
  94 + assert_equal myprofile_path(:controller => 'profile_editor', :profile => username), path
95 95 end
96 96 end
... ...