Files
2026-08-17 21:20:45 +02:00

21 lines
473 B
Go

package httpapi
import (
"strings"
"testing"
"github.com/descrybe/descrybe-v2/apps/api/internal/mail"
)
func TestInviteAcceptURLAlwaysShareable(t *testing.T) {
t.Parallel()
url := mail.AcceptInviteURL("https://app.example.com/", "tok_abc")
want := "https://app.example.com/accept-invite#token=tok_abc"
if url != want {
t.Fatalf("AcceptInviteURL = %q want %q", url, want)
}
if strings.Contains(url, "mailto:") {
t.Fatal("invite URL must not be mailto")
}
}