2015-08-10 11:05:06 +02:00
|
|
|
# This file should contain all the record creation needed to seed the database with its default values.
|
|
|
|
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
2018-06-12 13:45:16 +02:00
|
|
|
|
2015-08-10 11:05:06 +02:00
|
|
|
#
|
2018-06-12 13:45:16 +02:00
|
|
|
# Create an initial user who can use all roles
|
2015-08-10 11:05:06 +02:00
|
|
|
#
|
2018-06-12 13:45:16 +02:00
|
|
|
|
|
|
|
default_user = "test@exemple.fr"
|
2018-09-26 17:51:06 +02:00
|
|
|
default_password = "this is a very complicated password !"
|
2018-06-12 13:45:16 +02:00
|
|
|
|
|
|
|
puts "Create test user '#{default_user}'"
|
2020-11-25 19:54:32 +01:00
|
|
|
SuperAdmin.create!(email: default_user, password: default_password)
|
2019-10-16 14:15:47 +02:00
|
|
|
user = User.create!(
|
2019-08-14 15:20:08 +02:00
|
|
|
email: default_user,
|
|
|
|
password: default_password,
|
2019-10-16 14:15:47 +02:00
|
|
|
confirmed_at: Time.zone.now
|
2019-08-14 15:20:08 +02:00
|
|
|
)
|
2019-10-16 14:15:47 +02:00
|
|
|
user.create_instructeur!
|
2020-03-18 04:03:34 +01:00
|
|
|
user.create_administrateur!
|