added missing mails.sendRecordAuthAlert jsvm binding
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user