1
0
Fork 0
mirror of synced 2024-06-02 02:25:17 +12:00
budibase/packages/worker/src/tests/api/email.ts

22 lines
513 B
TypeScript
Raw Normal View History

import TestConfiguration from "../TestConfiguration"
2022-11-12 04:43:41 +13:00
import { TestAPI } from "./base"
2022-11-12 04:43:41 +13:00
export class EmailAPI extends TestAPI {
constructor(config: TestConfiguration) {
2022-11-12 04:43:41 +13:00
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)
}
}