MustCreateUser is a test helper for creating a new user in the system by calling the underlying DB service directly.
(tb testing.TB, m *main.Main, user *wtf.User)
| 46 | // MustCreateUser is a test helper for creating a new user in the system by |
| 47 | // calling the underlying DB service directly. |
| 48 | func MustCreateUser(tb testing.TB, m *main.Main, user *wtf.User) (*wtf.User, context.Context) { |
| 49 | tb.Helper() |
| 50 | if err := m.UserService.CreateUser(context.Background(), user); err != nil { |
| 51 | tb.Fatal(err) |
| 52 | } |
| 53 | return user, wtf.NewContextWithUser(context.Background(), user) |
| 54 | } |
| 55 | |
| 56 | // Login returns a Chrome action that generates a secure cookie and attaches it |
| 57 | // to the browser. This approach is used to avoid OAuth communication with GitHub. |
no test coverage detected