Fix failing table test
This commit is contained in:
parent
bc1d1862b5
commit
b6267e0f96
|
@ -44,8 +44,12 @@ export default class BaseAPI {
|
|||
return [response, json]
|
||||
}
|
||||
|
||||
async del(url: string, statusCode?: number): Promise<[Response, any]> {
|
||||
const [response, json] = await this.client.del(url)
|
||||
async del(
|
||||
url: string,
|
||||
statusCode?: number,
|
||||
body?: any
|
||||
): Promise<[Response, any]> {
|
||||
const [response, json] = await this.client.del(url, { body })
|
||||
expect(response).toHaveStatusCode(statusCode ? statusCode : 200)
|
||||
return [response, json]
|
||||
}
|
||||
|
|
|
@ -28,7 +28,11 @@ export default class RowAPI extends BaseAPI {
|
|||
}
|
||||
|
||||
async delete(tableId: string, body: any): Promise<[Response, Row[]]> {
|
||||
const [response, json] = await this.del(`/${tableId}/rows/`, body)
|
||||
const [response, json] = await this.del(
|
||||
`/${tableId}/rows/`,
|
||||
undefined,
|
||||
body
|
||||
)
|
||||
return [response, json]
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue