(app App, total int)
| 105 | } |
| 106 | |
| 107 | func createTestSuperusers(app App, total int) error { |
| 108 | superusersCollection, err := app.FindCollectionByNameOrId(CollectionNameSuperusers) |
| 109 | if err != nil { |
| 110 | return err |
| 111 | } |
| 112 | |
| 113 | for i := range total { |
| 114 | superuser := NewRecord(superusersCollection) |
| 115 | superuser.SetEmail("test" + strconv.Itoa(i+1) + "@example.com") |
| 116 | superuser.SetRandomPassword() |
| 117 | |
| 118 | if err := app.Save(superuser); err != nil { |
| 119 | return err |
| 120 | } |
| 121 | } |
| 122 | |
| 123 | return nil |
| 124 | } |
no test coverage detected
searching dependent graphs…