Updating query row API to correctly state successful if not returning an error.
This commit is contained in:
parent
b58aa807bd
commit
d20592e885
|
@ -152,7 +152,7 @@ export async function run({
|
||||||
|
|
||||||
return {
|
return {
|
||||||
rows,
|
rows,
|
||||||
success: !!ctx.body.rows,
|
success: true,
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return {
|
return {
|
||||||
|
|
|
@ -96,7 +96,7 @@ describe("Test a query step automation", () => {
|
||||||
)
|
)
|
||||||
.run()
|
.run()
|
||||||
|
|
||||||
expect(result.steps[0].outputs.success).toBe(false)
|
expect(result.steps[0].outputs.success).toBe(true)
|
||||||
expect(result.steps[0].outputs.rows).toBeDefined()
|
expect(result.steps[0].outputs.rows).toBeDefined()
|
||||||
expect(result.steps[0].outputs.rows.length).toBe(0)
|
expect(result.steps[0].outputs.rows.length).toBe(0)
|
||||||
})
|
})
|
||||||
|
@ -125,7 +125,7 @@ describe("Test a query step automation", () => {
|
||||||
)
|
)
|
||||||
.run()
|
.run()
|
||||||
|
|
||||||
expect(result.steps[0].outputs.success).toBe(false)
|
expect(result.steps[0].outputs.success).toBe(true)
|
||||||
expect(result.steps[0].outputs.rows).toBeDefined()
|
expect(result.steps[0].outputs.rows).toBeDefined()
|
||||||
expect(result.steps[0].outputs.rows.length).toBe(0)
|
expect(result.steps[0].outputs.rows.length).toBe(0)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue