Give seed admin enough activity to take all normal user actions

This commit is contained in:
Chris Lloyd 2019-01-16 06:14:01 -08:00 committed by Peter Bhat Harkins
parent 9ed740767d
commit 0a484e38d1
1 changed files with 21 additions and 2 deletions

View File

@ -1,7 +1,26 @@
pwd = SecureRandom.base58
User.create(:username => "inactive-user", :email => "inactive-user@example.com", :password => pwd, :password_confirmation => pwd)
User.create(
:username => "inactive-user",
:email => "inactive-user@example.com",
:password => pwd,
:password_confirmation => pwd
)
User.create(:username => "test", :email => "test@example.com", :password => "test", :password_confirmation => "test", :is_admin => true, :is_moderator => true)
User.create(
:username => "test",
:email => "test@example.com",
:password => "test",
:password_confirmation => "test",
:is_admin => true,
:is_moderator => true,
:karma => [
User::MIN_KARMA_TO_SUGGEST,
User::MIN_KARMA_TO_DOWNVOTE,
User::MIN_KARMA_TO_SUBMIT_STORIES,
User::MIN_KARMA_FOR_INVITATION_REQUESTS
].max,
:created_at => User::NEW_USER_DAYS.days.ago
)
Tag.create(:tag => "test")