-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix user seeds not populating from pwned_password validation
- Loading branch information
1 parent
306e300
commit 55115b4
Showing
2 changed files
with
8 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,7 @@ | |
.idea/ | ||
.tags | ||
*.swp | ||
.tool-versions | ||
|
||
# Ignore coverage results | ||
/coverage | ||
|
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 |
---|---|---|
|
@@ -7,10 +7,13 @@ | |
# Mayor.create(name: 'Emanuel', city: cities.first) | ||
|
||
# Users | ||
user1 = User.create(name: 'Test1 Lastname', email: '[email protected]', password: 'passworD@99', confirmed_at: Time.zone.now, location: 'Toronto, ON, Canada', about: 'Hi my name is Test1! I want to use the site so that I can improve the way I handle my anxiety.') | ||
user2 = User.create(name: 'Test2 Lastname', email: '[email protected]', password: 'passworD@99', confirmed_at: Time.zone.now, location: 'Toronto, ON, Canada') | ||
user3 = User.create(name: 'Test3 Two-Lastnames', email: '[email protected]', password: 'passworD@99', confirmed_at: Time.zone.now, location: 'San Francisco, CA, United States') | ||
user4 = User.create(name: 'Admin User', email: '[email protected]', password: 'passworD@99', confirmed_at: Time.zone.now, location: 'San Francisco, CA, United States', admin: true) | ||
user1 = User.new(name: 'Test1 Lastname', email: '[email protected]', password: 'passworD@99', confirmed_at: Time.zone.now, location: 'Toronto, ON, Canada', about: 'Hi my name is Test1! I want to use the site so that I can improve the way I handle my anxiety.') | ||
user2 = User.new(name: 'Test2 Lastname', email: '[email protected]', password: 'passworD@99', confirmed_at: Time.zone.now, location: 'Toronto, ON, Canada') | ||
user3 = User.new(name: 'Test3 Two-Lastnames', email: '[email protected]', password: 'passworD@99', confirmed_at: Time.zone.now, location: 'San Francisco, CA, United States') | ||
user4 = User.new(name: 'Admin User', email: '[email protected]', password: 'passworD@99', confirmed_at: Time.zone.now, location: 'San Francisco, CA, United States', admin: true) | ||
|
||
## Save with validate: false to bypass pwned_password data breach check for seeding users | ||
[user1, user2, user3, user4].each { |user| user.save!(validate: false) } | ||
|
||
# Allies | ||
Allyship.create(user_id: user1.id, ally_id: user2.id, status: :accepted) | ||
|