Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F9583209
simple.test.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
750 B
Referenced Files
None
Subscribers
None
simple.test.ts
View Options
import
assert
from
"assert"
;
import
{
withRunningApp
,
withTestApp
}
from
"../../test_utils/with-test-app.js"
;
import
SimpleTemplate
from
"./simple.js"
;
describe
(
"simpleTemplate"
,
()
=>
{
it
(
"sends an email"
,
async
()
=>
withTestApp
(
true
,
"production"
,
null
,
async
({
app
,
mail_api
})
=>
{
await
mail_api
.
deleteAllInstanceEmails
();
const
message
=
await
SimpleTemplate
(
app
,
{
to
:
"test@example.com"
,
subject
:
"Congratulations!"
,
text
:
"Enlarge your 'seal' with herbal supplements"
,
});
await
message
.
send
(
app
);
const
messages
=
await
mail_api
.
getMessages
();
assert
.
strictEqual
(
messages
.
length
,
1
);
assert
.
strictEqual
(
messages
[
0
].
sender
,
`<
${
app
.
ConfigManager
.
get
(
"email"
).
from_address
}
>`
);
}));
});
File Metadata
Details
Attached
Mime Type
text/x-java
Expires
Sat, Oct 11, 09:10 (8 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
976693
Default Alt Text
simple.test.ts (750 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment