MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / configureEmailForTest

Function configureEmailForTest

internal/server/cloud_admin_gate_test.go:771–776  ·  view source on GitHub ↗

configureEmailForTest attaches an email.Sender wired to the given mock endpoint plus a base URL so s.baseURL != "" (the configured check looks at both).

(srv *Server, endpoint, baseURL string)

Source from the content-addressed store, hash-verified

769// mock endpoint plus a base URL so s.baseURL != "" (the configured
770// check looks at both).
771func configureEmailForTest(srv *Server, endpoint, baseURL string) {
772 sender := email.NewSender("test-key", "noreply@test.getpad.dev", "Pad Test", baseURL)
773 sender.SetEndpoint(endpoint)
774 srv.SetEmailSender(sender, "test-key")
775 srv.SetBaseURL(baseURL)
776}
777
778// TestPaymentFailed_HappyPath_SendsAndAudits covers the end-to-end
779// success path: Maileroo returns 200/success, pad records an audit row

Calls 4

SetEndpointMethod · 0.95
NewSenderFunction · 0.92
SetEmailSenderMethod · 0.80
SetBaseURLMethod · 0.80

Tested by

no test coverage detected