clean up duplicated user creation code (#50178) (#50327)

* clean up duplicated user creation code

* remove unused duplicate getOrCreateOrg function

* fix up tests

(cherry picked from commit 9350ab781c)
This commit is contained in:
Dan Cech authored and GitHub committed 2022-06-13 07:12:00 -04:00
1 parent 5390fa57e9
commit bc2f941004
12 files changed
+49 -217

No files matched your search

@@ -107,6 +107,9 @@ func TestPlugins(t *testing.T) {
func createUser(t *testing.T, store *sqlstore.SQLStore, cmd models.CreateUserCommand) {
t.Helper()
store.Cfg.AutoAssignOrg = true
store.Cfg.AutoAssignOrgId = 1
_, err := store.CreateUser(context.Background(), cmd)
require.NoError(t, err)
}