1
0
Fork 0
mirror of synced 2024-06-27 02:20:35 +12:00

Query seq fix.

This commit is contained in:
mike12345567 2024-03-22 13:38:52 +00:00
parent 185e9c3425
commit defb925d16

View file

@ -78,6 +78,7 @@ describe("/queries", () => {
_rev: res.body._rev, _rev: res.body._rev,
_id: res.body._id, _id: res.body._id,
...query, ...query,
nullDefaultSupport: true,
createdAt: new Date().toISOString(), createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
}) })
@ -103,6 +104,7 @@ describe("/queries", () => {
_rev: res.body._rev, _rev: res.body._rev,
_id: res.body._id, _id: res.body._id,
...query, ...query,
nullDefaultSupport: true,
createdAt: new Date().toISOString(), createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
}) })
@ -130,6 +132,7 @@ describe("/queries", () => {
_id: query._id, _id: query._id,
createdAt: new Date().toISOString(), createdAt: new Date().toISOString(),
...basicQuery(datasource._id), ...basicQuery(datasource._id),
nullDefaultSupport: true,
updatedAt: new Date().toISOString(), updatedAt: new Date().toISOString(),
readable: true, readable: true,
}, },
@ -245,10 +248,10 @@ describe("/queries", () => {
expect(responseBody.rows.length).toEqual(1) expect(responseBody.rows.length).toEqual(1)
expect(events.query.previewed).toHaveBeenCalledTimes(1) expect(events.query.previewed).toHaveBeenCalledTimes(1)
delete datasource.config delete datasource.config
expect(events.query.previewed).toHaveBeenCalledWith( expect(events.query.previewed).toHaveBeenCalledWith(datasource, {
datasource, ...queryPreview,
queryPreview nullDefaultSupport: true,
) })
}) })
it("should apply authorization to endpoint", async () => { it("should apply authorization to endpoint", async () => {