Guest User

Untitled

a guest
Feb 19th, 2018
315
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. test 'should success sign-up and print success flash message' do
  2. request_params = {
  3. user: {
  4. first_name: 'Test',
  5. last_name: 'Test',
  6. email: 'example@test.com',
  7. password: 'password',
  8. password_confirmation: 'password'
  9. }
  10. }
  11.  
  12. post user_registration_path(request_params)
  13.  
  14. assert_redirected_to root_path
  15.  
  16. follow_redirect!
  17. follow_redirect!
  18.  
  19. assert_select(flash_message_container, text: 'Welcome! You have signed up successfully.')
  20. end
  21.  
  22. private
  23.  
  24. def flash_message_container
  25. '.flash-message-content'
  26. end
Add Comment
Please, Sign In to add comment