1
0
Fork 0
mirror of synced 2024-05-18 19:33:49 +12:00
budibase/packages/worker/src/tests/api/email.ts
2022-11-11 15:43:41 +00:00

22 lines
513 B
TypeScript

import TestConfiguration from "../TestConfiguration"
import { TestAPI } from "./base"
export class EmailAPI extends TestAPI {
constructor(config: TestConfiguration) {
super(config)
}
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)
}
}