mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
clean up duplicated user creation code (#50178)
* clean up duplicated user creation code * remove unused duplicate getOrCreateOrg function * fix up tests
This commit is contained in:
@@ -36,10 +36,10 @@ func TestServiceAccountsAPI_CreateServiceAccount(t *testing.T) {
|
||||
store := sqlstore.InitTestDB(t)
|
||||
svcmock := tests.ServiceAccountMock{}
|
||||
|
||||
autoAssignOrg := setting.AutoAssignOrg
|
||||
setting.AutoAssignOrg = true
|
||||
autoAssignOrg := store.Cfg.AutoAssignOrg
|
||||
store.Cfg.AutoAssignOrg = true
|
||||
defer func() {
|
||||
setting.AutoAssignOrg = autoAssignOrg
|
||||
store.Cfg.AutoAssignOrg = autoAssignOrg
|
||||
}()
|
||||
|
||||
orgCmd := &models.CreateOrgCommand{Name: "Some Test Org"}
|
||||
|
||||
Reference in New Issue
Block a user