mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-14 00:22:34 +02:00
Fix tests to account for addition of tls.rejectUnauthorized in SMTP
This commit is contained in:
parent
effbcc8fe9
commit
d7edafb81f
1 changed files with 12 additions and 9 deletions
|
@ -54,6 +54,9 @@ describe("notification to act properly on send", () => {
|
||||||
host: "host",
|
host: "host",
|
||||||
port: "port",
|
port: "port",
|
||||||
secure: "secure",
|
secure: "secure",
|
||||||
|
tls: {
|
||||||
|
"rejectUnauthorized": false,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
expect(res).toBe("Sent Successfully.");
|
expect(res).toBe("Sent Successfully.");
|
||||||
expect(sender).toHaveBeenCalledWith({
|
expect(sender).toHaveBeenCalledWith({
|
||||||
|
@ -62,10 +65,9 @@ describe("notification to act properly on send", () => {
|
||||||
from: "From",
|
from: "From",
|
||||||
subject: "PassedInMessage",
|
subject: "PassedInMessage",
|
||||||
text: "PassedInMessage\nTime (UTC): undefined",
|
text: "PassedInMessage\nTime (UTC): undefined",
|
||||||
tls: {
|
|
||||||
rejectUnauthorized: false,
|
|
||||||
},
|
|
||||||
to: "To",
|
to: "To",
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -111,6 +113,9 @@ describe("notification to act properly on send", () => {
|
||||||
host: "host",
|
host: "host",
|
||||||
port: "port",
|
port: "port",
|
||||||
secure: "secure",
|
secure: "secure",
|
||||||
|
tls: {
|
||||||
|
"rejectUnauthorized": false,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
expect(res).toBe("Sent Successfully.");
|
expect(res).toBe("Sent Successfully.");
|
||||||
expect(sender).toHaveBeenCalledWith({
|
expect(sender).toHaveBeenCalledWith({
|
||||||
|
@ -119,9 +124,6 @@ describe("notification to act properly on send", () => {
|
||||||
from: "From",
|
from: "From",
|
||||||
subject: "Name: testing | Status: ✅ Up | Hostname: https://www.google.com",
|
subject: "Name: testing | Status: ✅ Up | Hostname: https://www.google.com",
|
||||||
text: "PassedInMessage\nTime (UTC): undefined",
|
text: "PassedInMessage\nTime (UTC): undefined",
|
||||||
tls: {
|
|
||||||
rejectUnauthorized: false,
|
|
||||||
},
|
|
||||||
to: "To",
|
to: "To",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -205,6 +207,7 @@ describe("notification to get proper data from Notification.send", () => {
|
||||||
smtpCC: "CC",
|
smtpCC: "CC",
|
||||||
smtpBCC: "BCC",
|
smtpBCC: "BCC",
|
||||||
smtpTo: "To",
|
smtpTo: "To",
|
||||||
|
smtpIgnoreTLSError: true,
|
||||||
};
|
};
|
||||||
let monitorConf = {
|
let monitorConf = {
|
||||||
type: "http",
|
type: "http",
|
||||||
|
@ -229,6 +232,9 @@ describe("notification to get proper data from Notification.send", () => {
|
||||||
host: "host",
|
host: "host",
|
||||||
port: "port",
|
port: "port",
|
||||||
secure: "secure",
|
secure: "secure",
|
||||||
|
tls: {
|
||||||
|
"rejectUnauthorized": true,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
expect(sender).toHaveBeenCalledTimes(1);
|
expect(sender).toHaveBeenCalledTimes(1);
|
||||||
expect(sender).toHaveBeenCalledWith({
|
expect(sender).toHaveBeenCalledWith({
|
||||||
|
@ -237,9 +243,6 @@ describe("notification to get proper data from Notification.send", () => {
|
||||||
from: "From",
|
from: "From",
|
||||||
subject: "simple message",
|
subject: "simple message",
|
||||||
text: "simple message\nTime (UTC): undefined",
|
text: "simple message\nTime (UTC): undefined",
|
||||||
tls: {
|
|
||||||
rejectUnauthorized: false,
|
|
||||||
},
|
|
||||||
to: "To",
|
to: "To",
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue