(t *testing.T)
| 32 | } |
| 33 | |
| 34 | func TestSanitizedUrl(t *testing.T) { |
| 35 | var wh *Webhook |
| 36 | ctx := base.TestCtx(t) |
| 37 | wh = &Webhook{ |
| 38 | url: "https://foo%40bar.baz:my-%24ecret-p%40%25%24w0rd@example.com:8888/bar", |
| 39 | } |
| 40 | assert.Equal(t, "https://xxxxx:xxxxx@example.com:8888/bar", wh.SanitizedUrl(ctx)) |
| 41 | |
| 42 | wh = &Webhook{ |
| 43 | url: "https://example.com/does-not-count-as-url-embedded:basic-auth-credentials@qux", |
| 44 | } |
| 45 | assert.Equal(t, "https://example.com/does-not-count-as-url-embedded:basic-auth-credentials@qux", wh.SanitizedUrl(ctx)) |
| 46 | } |
| 47 | |
| 48 | func TestCallValidateFunction(t *testing.T) { |
| 49 | // Boolean return type handling of CallValidateFunction; Mock up a document change event and |
nothing calls this directly
no test coverage detected