diff options
Diffstat (limited to 'spec/support/helpers/sign_up_helpers.rb')
-rw-r--r-- | spec/support/helpers/sign_up_helpers.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/support/helpers/sign_up_helpers.rb b/spec/support/helpers/sign_up_helpers.rb index 6259467232c..f1449ed643e 100644 --- a/spec/support/helpers/sign_up_helpers.rb +++ b/spec/support/helpers/sign_up_helpers.rb @@ -3,11 +3,11 @@ require 'spec_helper' module SignUpHelpers - def fill_in_sign_up_form(new_user, submit_button_text = 'Register') + def fill_in_sign_up_form(new_user, submit_button_text = 'Register', invite: false) fill_in 'new_user_first_name', with: new_user.first_name fill_in 'new_user_last_name', with: new_user.last_name fill_in 'new_user_username', with: new_user.username - fill_in 'new_user_email', with: new_user.email + fill_in 'new_user_email', with: new_user.email unless invite fill_in 'new_user_password', with: new_user.password wait_for_all_requests @@ -19,6 +19,12 @@ module SignUpHelpers click_button submit_button_text end + def confirm_email(new_user) + new_user_token = User.find_by_email(new_user.email).confirmation_token + + visit user_confirmation_path(confirmation_token: new_user_token) + end + private def expect_username_to_be_validated |