added missing mails.sendRecordAuthAlert jsvm binding
This commit is contained in:
parent
1775585b68
commit
09d7f6a7c3
|
|
@ -663,6 +663,7 @@ func mailsBinds(vm *goja.Runtime) {
|
||||||
obj.Set("sendRecordVerification", mails.SendRecordVerification)
|
obj.Set("sendRecordVerification", mails.SendRecordVerification)
|
||||||
obj.Set("sendRecordChangeEmail", mails.SendRecordChangeEmail)
|
obj.Set("sendRecordChangeEmail", mails.SendRecordChangeEmail)
|
||||||
obj.Set("sendRecordOTP", mails.SendRecordOTP)
|
obj.Set("sendRecordOTP", mails.SendRecordOTP)
|
||||||
|
obj.Set("sendRecordAuthAlert", mails.SendRecordAuthAlert)
|
||||||
}
|
}
|
||||||
|
|
||||||
func securityBinds(vm *goja.Runtime) {
|
func securityBinds(vm *goja.Runtime) {
|
||||||
|
|
|
||||||
|
|
@ -795,7 +795,7 @@ func TestMailsBindsCount(t *testing.T) {
|
||||||
vm := goja.New()
|
vm := goja.New()
|
||||||
mailsBinds(vm)
|
mailsBinds(vm)
|
||||||
|
|
||||||
testBindsCount(vm, "$mails", 4, t)
|
testBindsCount(vm, "$mails", 5, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMailsBinds(t *testing.T) {
|
func TestMailsBinds(t *testing.T) {
|
||||||
|
|
@ -833,6 +833,11 @@ func TestMailsBinds(t *testing.T) {
|
||||||
if (!$app.testMailer.lastMessage().html.includes("test_otp_pass")) {
|
if (!$app.testMailer.lastMessage().html.includes("test_otp_pass")) {
|
||||||
throw new Error("Expected record OTP email, got:" + JSON.stringify($app.testMailer.lastMessage()))
|
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 {
|
if vmErr != nil {
|
||||||
t.Fatal(vmErr)
|
t.Fatal(vmErr)
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -788,6 +788,7 @@ declare namespace $mails {
|
||||||
let sendRecordVerification: mails.sendRecordVerification
|
let sendRecordVerification: mails.sendRecordVerification
|
||||||
let sendRecordChangeEmail: mails.sendRecordChangeEmail
|
let sendRecordChangeEmail: mails.sendRecordChangeEmail
|
||||||
let sendRecordOTP: mails.sendRecordOTP
|
let sendRecordOTP: mails.sendRecordOTP
|
||||||
|
let sendRecordAuthAlert: mails.sendRecordAuthAlert
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue