Add polished answer notifications (#1)

Sends a branded Resend email when a question receives its first answer, records accepted and failed sends, and adds collapsed answer editing with cancel behavior.

Co-authored-by: codegirl-007 <s.raide@gmail.com>
This commit was merged in pull request #1.
This commit is contained in:
2026-08-27 06:55:24 +00:00
committed by codegirl007
parent 35c8c9f391
commit 418ef93da5
28 changed files with 827 additions and 74 deletions
+21
View File
@@ -0,0 +1,21 @@
package store
import "testing"
func TestValidateEmail(t *testing.T) {
cases := []struct {
in, want, err string
}{
{"", "", "Email is required."},
{" Alice@Example.COM ", "alice@example.com", ""},
{"not-an-email", "", "Enter a valid email address."},
{"a@b", "", "Enter a valid email address."},
{"ok@example.com", "ok@example.com", ""},
}
for _, tc := range cases {
got, msg := ValidateEmail(tc.in)
if got != tc.want || msg != tc.err {
t.Fatalf("%q: got (%q, %q) want (%q, %q)", tc.in, got, msg, tc.want, tc.err)
}
}
}