2022-08-26 06:41:47 +12:00
|
|
|
import TestConfiguration from "../TestConfiguration"
|
2022-11-12 04:43:41 +13:00
|
|
|
import { TestAPI } from "./base"
|
2022-08-26 06:41:47 +12:00
|
|
|
|
2022-11-12 04:43:41 +13:00
|
|
|
export class EmailAPI extends TestAPI {
|
2022-08-26 06:41:47 +12:00
|
|
|
constructor(config: TestConfiguration) {
|
2022-11-12 04:43:41 +13:00
|
|
|
super(config)
|
2022-08-26 06:41:47 +12:00
|
|
|
}
|
|
|
|
|
|
|
|
sendEmail = (purpose: string) => {
|
|
|
|
return this.request
|
|
|
|
.post(`/api/global/email/send`)
|
|
|
|
.send({
|
|
|
|
email: "test@test.com",
|
|
|
|
purpose,
|
|
|
|
tenantId: this.config.getTenantId(),
|
|
|
|
})
|
|
|
|
.set(this.config.defaultHeaders())
|
|
|
|
.expect("Content-Type", /json/)
|
|
|
|
.expect(200)
|
|
|
|
}
|
|
|
|
}
|