Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F5665702
simple.test.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
744 B
Referenced Files
None
Subscribers
None
simple.test.ts
View Options
import
assert
from
"assert"
;
import
{
withRunningApp
,
withTestApp
}
from
"../../test_utils/with-test-app"
;
import
SimpleTemplate
from
"./simple"
;
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, Jun 7, 23:23 (15 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
661681
Default Alt Text
simple.test.ts (744 B)
Attached To
Mode
rS Sealious
Attached
Detach File
Event Timeline
Log In to Comment