(t *testing.T)
| 19 | ) |
| 20 | |
| 21 | func TestServer_StartStop(t *testing.T) { |
| 22 | t.Parallel() |
| 23 | |
| 24 | ctx := context.Background() |
| 25 | srv := new(smtpmock.Server) |
| 26 | err := srv.Start(ctx, smtpmock.Config{ |
| 27 | HostAddress: "127.0.0.1", |
| 28 | SMTPPort: 0, |
| 29 | APIPort: 0, |
| 30 | Logger: slogtest.Make(t, nil), |
| 31 | }) |
| 32 | require.NoError(t, err) |
| 33 | require.NotEmpty(t, srv.SMTPAddress()) |
| 34 | require.NotEmpty(t, srv.APIAddress()) |
| 35 | |
| 36 | err = srv.Stop() |
| 37 | require.NoError(t, err) |
| 38 | } |
| 39 | |
| 40 | func TestServer_SendAndReceiveEmail(t *testing.T) { |
| 41 | t.Parallel() |
nothing calls this directly
no test coverage detected