(t *testing.T)
| 131 | } |
| 132 | |
| 133 | func TestWebhook_InvalidMethod(t *testing.T) { |
| 134 | ctx := testlogging.Context(t) |
| 135 | p, err := sender.GetSender(ctx, "my-profile", "webhook", &webhook.Options{ |
| 136 | Endpoint: "http://localhost:41123/no-such-path", |
| 137 | Method: "?", |
| 138 | }) |
| 139 | |
| 140 | require.NoError(t, err) |
| 141 | |
| 142 | require.ErrorContains(t, p.Send(ctx, &sender.Message{ |
| 143 | Subject: "Test", |
| 144 | Body: "test", |
| 145 | }), "net/http: invalid method \"?\"") |
| 146 | } |
| 147 | |
| 148 | func TestMergeOptions(t *testing.T) { |
| 149 | var dst webhook.Options |