Improve seed output

This commit is contained in:
2024-03-13 14:28:31 +01:00
parent 06521d1c34
commit 8de0a2e26e
2 changed files with 3 additions and 1 deletions

View File

@@ -5,6 +5,8 @@ ldap = LdapService.new
Sidekiq::Testing.inline! do
ldap.delete_all_users!
puts "Create user: admin"
CreateAccount.call(account: {
username: "admin", domain: "kosmos.org", email: "admin@example.com",
password: "admin is admin", confirmed: true
@@ -12,6 +14,7 @@ Sidekiq::Testing.inline! do
ldap.add_attribute "cn=admin,ou=kosmos.org,cn=users,dc=kosmos,dc=org", :admin, "true"
puts "Create 35 random users"
35.times do |n|
username = Faker::Name.unique.first_name.downcase
email = Faker::Internet.unique.email