Fixing test cases.
This commit is contained in:
parent
8b2c505050
commit
24eebd9b98
|
@ -26,8 +26,8 @@ describe("/datasources", () => {
|
|||
.expect('Content-Type', /json/)
|
||||
.expect(200)
|
||||
|
||||
expect(res.res.statusMessage).toEqual("Datasource saved successfully.")
|
||||
expect(res.body.name).toEqual("Test")
|
||||
expect(res.body.datasource.name).toEqual("Test")
|
||||
expect(res.body.errors).toBeUndefined()
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
// mock out postgres for this
|
||||
jest.mock("pg")
|
||||
|
||||
const { findLastKey } = require("lodash/fp")
|
||||
const setup = require("./utilities")
|
||||
const { checkBuilderEndpoint } = require("./utilities/TestFunctions")
|
||||
const { basicQuery, basicDatasource } = setup.structures
|
||||
|
|
|
@ -283,7 +283,8 @@ class TestConfiguration {
|
|||
|
||||
async createDatasource(config = null) {
|
||||
config = config || basicDatasource()
|
||||
this.datasource = await this._req(config, null, controllers.datasource.save)
|
||||
const response = await this._req(config, null, controllers.datasource.save)
|
||||
this.datasource = response.datasource
|
||||
return this.datasource
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue