NewSuperuser creates a new user with superuser permission in the fixture's admin service.
(t *testing.T)
| 232 | |
| 233 | // NewSuperuser creates a new user with superuser permission in the fixture's admin service. |
| 234 | func (f *Fixture) NewSuperuser(t *testing.T) (*database.User, *client.Client) { |
| 235 | u, c := f.NewUserWithDomain(t, "test-superuser.com") |
| 236 | err := f.Admin.DB.UpdateSuperuser(t.Context(), u.ID, true) |
| 237 | require.NoError(t, err) |
| 238 | return u, c |
| 239 | } |
| 240 | |
| 241 | // NewUserWithDomain creates a new user with a random email with the given email domain in the fixture's admin service. |
| 242 | func (f *Fixture) NewUserWithDomain(t *testing.T, domain string) (*database.User, *client.Client) { |