Guest User

Untitled

a guest
Mar 9th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. def test_login_then_dashboard
  2. user = users(:theo)
  3. no_login do
  4. get '/user/login'
  5. end
  6. assert_response :success
  7.  
  8. post '/user/login', :user => { :login => 'theo', :password => '1234' }
  9. assert_response :redirect
  10. assert_redirected_to :action => :index
  11.  
  12. # login with needed as current_member is used in the dashboard action.
  13. get "/profile/dashboard/#{user.profile.to_param}"
  14. assert_response :success
  15. end
Add Comment
Please, Sign In to add comment