Fix update datasource test helper
This commit is contained in:
parent
881ff02a7d
commit
9c6e880479
|
@ -30,16 +30,12 @@ export class DatasourceAPI extends TestAPI {
|
||||||
}
|
}
|
||||||
|
|
||||||
update = async (
|
update = async (
|
||||||
config: Datasource,
|
datasource: Datasource,
|
||||||
{ expectStatus } = { expectStatus: 200 }
|
{ expectStatus } = { expectStatus: 200 }
|
||||||
): Promise<Datasource> => {
|
): Promise<Datasource> => {
|
||||||
const body: CreateDatasourceRequest = {
|
|
||||||
datasource: config,
|
|
||||||
tablesFilter: [],
|
|
||||||
}
|
|
||||||
const result = await this.request
|
const result = await this.request
|
||||||
.put(`/api/datasources/${config._id}`)
|
.put(`/api/datasources/${datasource._id}`)
|
||||||
.send(body)
|
.send(datasource)
|
||||||
.set(this.config.defaultHeaders())
|
.set(this.config.defaultHeaders())
|
||||||
.expect("Content-Type", /json/)
|
.expect("Content-Type", /json/)
|
||||||
.expect(expectStatus)
|
.expect(expectStatus)
|
||||||
|
|
Loading…
Reference in New Issue