-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: share accounts/form with onboarding path
- Loading branch information
Showing
5 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,8 @@ class OnboardingTest < ApplicationSystemTestCase | |
assert_text I18n.t("devise.registrations.signed_up_but_unconfirmed") | ||
|
||
# This is a hack to confirm the email for the user | ||
User.find_by(email: "[email protected]").update(confirmed_at: Time.now) | ||
user = User.find_by(email: "[email protected]") | ||
user.update(confirmed_at: Time.now) | ||
|
||
# Login in with the newly created user | ||
visit new_user_session_path | ||
|
@@ -26,12 +27,12 @@ class OnboardingTest < ApplicationSystemTestCase | |
assert_current_path onboarding_path | ||
|
||
# Fill the personal account setup form | ||
fill_in "account[name]", with: "John Doe" | ||
# fill_in "account[my_custom_field]", with: "My custom value" | ||
fill_in_account_fields | ||
|
||
click_on "commit" | ||
|
||
# Should be redirected to dashboard after successfully signing up. | ||
assert_current_path dashboard_path | ||
assert_equal "New name", user.reload.personal_account.name | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters