-
-
Notifications
You must be signed in to change notification settings - Fork 740
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: now you can add env type to env order (#8442)
- Loading branch information
Showing
4 changed files
with
28 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,16 +118,28 @@ test('Can send order environments email', async () => { | |
} as unknown as IUnleashConfig); | ||
|
||
const customerId = 'customer133'; | ||
const environments = ['development', 'production']; | ||
const environments = [ | ||
{ name: 'test', type: 'development' }, | ||
{ name: 'live', type: 'production' }, | ||
]; | ||
|
||
const content = await emailService.sendOrderEnvironmentEmail( | ||
'[email protected]', | ||
customerId, | ||
environments, | ||
); | ||
expect(content.from).toBe('[email protected]'); | ||
expect(content.subject).toBe('Unleash - ordered environments successfully'); | ||
expect(content.html.includes(`<li>${environments[0]}</li>`)).toBe(true); | ||
expect(content.html.includes(`<li>${environments[1]}</li>`)).toBe(true); | ||
expect( | ||
content.html.includes( | ||
`<li>Name: ${environments[0].name}, Type: ${environments[0].type}</li>`, | ||
), | ||
).toBe(true); | ||
expect( | ||
content.html.includes( | ||
`<li>Name: ${environments[1].name}, Type: ${environments[1].type}</li>`, | ||
), | ||
).toBe(true); | ||
expect(content.html.includes(customerId)).toBe(true); | ||
expect(content.bcc).toBe('[email protected]'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters