MustUUID generates a UUID and fails the test on error
(t *testing.T)
| 66 | |
| 67 | // MustUUID generates a UUID and fails the test on error |
| 68 | func MustUUID(t *testing.T) string { |
| 69 | uuid, err := helpers.GenUUID() |
| 70 | if err != nil { |
| 71 | t.Fatal(errors.Wrap(err, "Failed to generate UUID")) |
| 72 | } |
| 73 | return uuid |
| 74 | } |
| 75 | |
| 76 | // SetupUserData creates and returns a new user with email and password for testing purposes |
| 77 | func SetupUserData(db *gorm.DB, email, password string) database.User { |