1 import * as request from 'supertest'
2 import { ContactForm } from '../../models/server'
3 import { HttpStatusCode } from '../../../shared/core-utils/miscs/http-error-codes'
5 function sendContactForm (options: {
11 expectedStatus?: number
13 const path = '/api/v1/server/contact'
15 const body: ContactForm = {
16 fromEmail: options.fromEmail,
17 fromName: options.fromName,
18 subject: options.subject,
21 return request(options.url)
24 .expect(options.expectedStatus || HttpStatusCode.NO_CONTENT_204)
27 // ---------------------------------------------------------------------------