Skip to content

Commit

Permalink
Use Role::<role>#role_name in seeds
Browse files Browse the repository at this point in the history
Instead of duplicating the names.
  • Loading branch information
chrisroos committed Sep 7, 2023
1 parent 9800825 commit fb12d46
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
name: "Test Superadmin",
email: "test.superadmin@gov.uk",
password: "6fe552ca-d406-4c54-b7a6-041ed1ade6cd",
role: :superadmin,
role: Roles::Superadmin.role_name,
confirmed_at: Time.zone.now,
organisation: gds,
)
Expand All @@ -20,7 +20,7 @@
name: "Test Admin",
email: "test.admin@gov.uk",
password: "6fe552ca-d406-4c54-b7a6-041ed1ade6cd",
role: :admin,
role: Roles::Admin.role_name,
confirmed_at: Time.zone.now,
organisation: gds,
)
Expand All @@ -29,7 +29,7 @@
name: "Test Super Organisation Admin",
email: "test.super-organisation-admin@gov.uk",
password: "6fe552ca-d406-4c54-b7a6-041ed1ade6cd",
role: :super_organisation_admin,
role: Roles::SuperOrganisationAdmin.role_name,
confirmed_at: Time.zone.now,
organisation: gds,
)
Expand All @@ -38,7 +38,7 @@
name: "Test Organisation Admin",
email: "test.organisation-admin@gov.uk",
password: "6fe552ca-d406-4c54-b7a6-041ed1ade6cd",
role: :organisation_admin,
role: Roles::OrganisationAdmin.role_name,
confirmed_at: Time.zone.now,
organisation: gds,
)
Expand All @@ -63,7 +63,7 @@
name: "Test User",
email: "test.user@gov.uk",
password: "6fe552ca-d406-4c54-b7a6-041ed1ade6cd",
role: :normal,
role: Roles::Normal.role_name,
confirmed_at: Time.zone.now,
organisation: test_organisation_without_2sv,
)
Expand Down Expand Up @@ -99,7 +99,7 @@
name: "Test User with 2SV enabled",
email: "test.user.2sv@gov.uk",
password: "6fe552ca-d406-4c54-b7a6-041ed1ade6cd",
role: :normal,
role: Roles::Normal.role_name,
confirmed_at: Time.zone.now,
organisation: test_organisation_without_2sv,
require_2sv: true,
Expand All @@ -110,7 +110,7 @@
name: "Test User from organisation with mandatory 2SV",
email: "test.user.2sv.organisation@gov.uk",
password: "6fe552ca-d406-4c54-b7a6-041ed1ade6cd",
role: :normal,
role: Roles::Normal.role_name,
confirmed_at: Time.zone.now,
organisation: test_organisation_with_2sv,
require_2sv: true,
Expand All @@ -122,7 +122,7 @@
api_user: true,
email: "test.apiuser@gov.uk",
password: "6fe552ca-d406-4c54-b7a6-041ed1ade6cd",
role: :normal,
role: Roles::Normal.role_name,
confirmed_at: Time.zone.now,
require_2sv: false,
)
Expand Down

0 comments on commit fb12d46

Please sign in to comment.