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

Function configureEmailForTest

internal/server/cloud_admin_gate_test.go:772–777  ·  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

770// mock endpoint plus a base URL so s.baseURL != "" (the configured
771// check looks at both).
772func configureEmailForTest(srv *Server, endpoint, baseURL string) {
773 sender := email.NewSender("test-key", "noreply@test.getpad.dev", "Pad Test", baseURL)
774 sender.SetEndpoint(endpoint)
775 srv.SetEmailSender(sender, "test-key")
776 srv.SetBaseURL(baseURL)
777}
778
779// TestPaymentFailed_HappyPath_SendsAndAudits covers the end-to-end
780// 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