Migrate RowAPI.validate
This commit is contained in:
parent
a639ba91d3
commit
58b1c2bca6
|
@ -46,15 +46,15 @@ export class RowAPI extends TestAPI {
|
||||||
validate = async (
|
validate = async (
|
||||||
sourceId: string,
|
sourceId: string,
|
||||||
row: SaveRowRequest,
|
row: SaveRowRequest,
|
||||||
{ expectStatus } = { expectStatus: 200 }
|
expectations?: Expectations
|
||||||
): Promise<ValidateResponse> => {
|
): Promise<ValidateResponse> => {
|
||||||
const resp = await this.request
|
return await this._post<ValidateResponse>(
|
||||||
.post(`/api/${sourceId}/rows/validate`)
|
`/api/${sourceId}/rows/validate`,
|
||||||
.send(row)
|
{
|
||||||
.set(this.config.defaultHeaders())
|
body: row,
|
||||||
.expect("Content-Type", /json/)
|
expectations,
|
||||||
.expect(expectStatus)
|
}
|
||||||
return resp.body as ValidateResponse
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
patch = async (
|
patch = async (
|
||||||
|
|
Loading…
Reference in New Issue