From d0ab24b9e3d07918e6084c44915b91628eea25da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Gilberto=20Balsini=20Moura?= Date: Sun, 13 Sep 2020 06:54:08 -0300 Subject: [PATCH] Add seeds to create user and admin --- priv/repo/seeds.exs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/priv/repo/seeds.exs b/priv/repo/seeds.exs index 613333b..a38dc74 100644 --- a/priv/repo/seeds.exs +++ b/priv/repo/seeds.exs @@ -9,3 +9,21 @@ # # We recommend using the bang functions (`insert!`, `update!` # and so on) as they will fail if something goes wrong. + +RealEstate.Accounts.register_admin(%{ + email: "admin@company.com", + password: "123456789abc", + password_confirmation: "123456789abc" +}) + +RealEstate.Accounts.register_user(%{ + email: "user1@company.com", + password: "123456789abc", + password_confirmation: "123456789abc" +}) + +RealEstate.Accounts.register_user(%{ + email: "user2@company.com", + password: "123456789abc", + password_confirmation: "123456789abc" +})