added missing mails.sendRecordAuthAlert jsvm binding

This commit is contained in:
Gani Georgiev
2025-11-13 10:38:33 +02:00
parent 1775585b68
commit 09d7f6a7c3
4 changed files with 5671 additions and 5663 deletions

View File

@@ -795,7 +795,7 @@ func TestMailsBindsCount(t *testing.T) {
vm := goja.New()
mailsBinds(vm)
testBindsCount(vm, "$mails", 4, t)
testBindsCount(vm, "$mails", 5, t)
}
func TestMailsBinds(t *testing.T) {
@@ -833,6 +833,11 @@ func TestMailsBinds(t *testing.T) {
if (!$app.testMailer.lastMessage().html.includes("test_otp_pass")) {
throw new Error("Expected record OTP email, got:" + JSON.stringify($app.testMailer.lastMessage()))
}
$mails.sendRecordAuthAlert($app, record, "test_alert_info");
if (!$app.testMailer.lastMessage().html.includes("test_alert_info")) {
throw new Error("Expected record OTP email, got:" + JSON.stringify($app.testMailer.lastMessage()))
}
`)
if vmErr != nil {
t.Fatal(vmErr)