diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb index 92f30ea91..d2f01ec84 100644 --- a/spec/features/users_spec.rb +++ b/spec/features/users_spec.rb @@ -15,6 +15,11 @@ feature 'Users' do click_button 'Sign up' expect(page).to have_content "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account." + + sent_token = /.*confirmation_token=(.*)".*/.match(ActionMailer::Base.deliveries.last.body.to_s)[1] + visit user_confirmation_path(confirmation_token: sent_token) + + expect(page).to have_content "Your email address has been successfully confirmed" end scenario 'Sign in' do