(t *testing.T)
| 18 | ) |
| 19 | |
| 20 | func TestWebhookString(t *testing.T) { |
| 21 | var wh *Webhook |
| 22 | |
| 23 | wh = &Webhook{ |
| 24 | url: "http://username:password@example.com/foo", |
| 25 | } |
| 26 | assert.Equal(t, "Webhook handler [http://xxxxx:xxxxx@example.com/foo]", wh.String()) |
| 27 | |
| 28 | wh = &Webhook{ |
| 29 | url: "http://example.com:9000/baz", |
| 30 | } |
| 31 | assert.Equal(t, "Webhook handler [http://example.com:9000/baz]", wh.String()) |
| 32 | } |
| 33 | |
| 34 | func TestSanitizedUrl(t *testing.T) { |
| 35 | var wh *Webhook |