Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test 'should success sign-up and print success flash message' do
- request_params = {
- user: {
- first_name: 'Test',
- last_name: 'Test',
- email: 'example@test.com',
- password: 'password',
- password_confirmation: 'password'
- }
- }
- post user_registration_path(request_params)
- assert_redirected_to root_path
- follow_redirect!
- follow_redirect!
- assert_select(flash_message_container, text: 'Welcome! You have signed up successfully.')
- end
- private
- def flash_message_container
- '.flash-message-content'
- end
Add Comment
Please, Sign In to add comment