Rename actionTypes to actionType
This commit is contained in:
parent
9a5b3b27aa
commit
12f0ebba7a
|
@ -34,7 +34,7 @@ describe("MongoDB Integration", () => {
|
||||||
await config.integration.create({
|
await config.integration.create({
|
||||||
index: indexName,
|
index: indexName,
|
||||||
json: body,
|
json: body,
|
||||||
extra: { collection: "testCollection", actionTypes: "insertOne" },
|
extra: { collection: "testCollection", actionType: "insertOne" },
|
||||||
})
|
})
|
||||||
expect(config.integration.client.insertOne).toHaveBeenCalledWith(body)
|
expect(config.integration.client.insertOne).toHaveBeenCalledWith(body)
|
||||||
})
|
})
|
||||||
|
@ -44,7 +44,7 @@ describe("MongoDB Integration", () => {
|
||||||
json: {
|
json: {
|
||||||
address: "test",
|
address: "test",
|
||||||
},
|
},
|
||||||
extra: { collection: "testCollection", actionTypes: "find" },
|
extra: { collection: "testCollection", actionType: "find" },
|
||||||
}
|
}
|
||||||
const response = await config.integration.read(query)
|
const response = await config.integration.read(query)
|
||||||
expect(config.integration.client.find).toHaveBeenCalledWith(query.json)
|
expect(config.integration.client.find).toHaveBeenCalledWith(query.json)
|
||||||
|
@ -61,7 +61,7 @@ describe("MongoDB Integration", () => {
|
||||||
opt: "option",
|
opt: "option",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extra: { collection: "testCollection", actionTypes: "deleteOne" },
|
extra: { collection: "testCollection", actionType: "deleteOne" },
|
||||||
}
|
}
|
||||||
await config.integration.delete(query)
|
await config.integration.delete(query)
|
||||||
expect(config.integration.client.deleteOne).toHaveBeenCalledWith(
|
expect(config.integration.client.deleteOne).toHaveBeenCalledWith(
|
||||||
|
@ -83,7 +83,7 @@ describe("MongoDB Integration", () => {
|
||||||
upsert: false,
|
upsert: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extra: { collection: "testCollection", actionTypes: "updateOne" },
|
extra: { collection: "testCollection", actionType: "updateOne" },
|
||||||
}
|
}
|
||||||
await config.integration.update(query)
|
await config.integration.update(query)
|
||||||
expect(config.integration.client.updateOne).toHaveBeenCalledWith(
|
expect(config.integration.client.updateOne).toHaveBeenCalledWith(
|
||||||
|
@ -97,7 +97,7 @@ describe("MongoDB Integration", () => {
|
||||||
const restore = disableConsole()
|
const restore = disableConsole()
|
||||||
|
|
||||||
const query = {
|
const query = {
|
||||||
extra: { collection: "testCollection", actionTypes: "deleteOne" },
|
extra: { collection: "testCollection", actionType: "deleteOne" },
|
||||||
}
|
}
|
||||||
|
|
||||||
let error = null
|
let error = null
|
||||||
|
@ -125,7 +125,7 @@ describe("MongoDB Integration", () => {
|
||||||
upsert: false,
|
upsert: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extra: { collection: "testCollection", actionTypes: "updateOne" },
|
extra: { collection: "testCollection", actionType: "updateOne" },
|
||||||
}
|
}
|
||||||
await config.integration.update(query)
|
await config.integration.update(query)
|
||||||
expect(config.integration.client.updateOne).toHaveBeenCalled()
|
expect(config.integration.client.updateOne).toHaveBeenCalled()
|
||||||
|
@ -161,7 +161,7 @@ describe("MongoDB Integration", () => {
|
||||||
upsert: true,
|
upsert: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extra: { collection: "testCollection", actionTypes: "updateOne" },
|
extra: { collection: "testCollection", actionType: "updateOne" },
|
||||||
}
|
}
|
||||||
await config.integration.update(query)
|
await config.integration.update(query)
|
||||||
expect(config.integration.client.updateOne).toHaveBeenCalled()
|
expect(config.integration.client.updateOne).toHaveBeenCalled()
|
||||||
|
@ -200,7 +200,7 @@ describe("MongoDB Integration", () => {
|
||||||
upsert: false,
|
upsert: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
extra: { collection: "testCollection", actionTypes: "findOneAndUpdate" },
|
extra: { collection: "testCollection", actionType: "findOneAndUpdate" },
|
||||||
}
|
}
|
||||||
await config.integration.read(query)
|
await config.integration.read(query)
|
||||||
expect(config.integration.client.findOneAndUpdate).toHaveBeenCalled()
|
expect(config.integration.client.findOneAndUpdate).toHaveBeenCalled()
|
||||||
|
@ -245,7 +245,7 @@ describe("MongoDB Integration", () => {
|
||||||
{
|
{
|
||||||
"upsert": true
|
"upsert": true
|
||||||
}`,
|
}`,
|
||||||
extra: { collection: "testCollection", actionTypes: "updateOne" },
|
extra: { collection: "testCollection", actionType: "updateOne" },
|
||||||
}
|
}
|
||||||
await config.integration.update(query)
|
await config.integration.update(query)
|
||||||
expect(config.integration.client.updateOne).toHaveBeenCalled()
|
expect(config.integration.client.updateOne).toHaveBeenCalled()
|
||||||
|
@ -300,7 +300,7 @@ describe("MongoDB Integration", () => {
|
||||||
"upsert": true,
|
"upsert": true,
|
||||||
"extra": "ad\\"{\\"d"
|
"extra": "ad\\"{\\"d"
|
||||||
}`,
|
}`,
|
||||||
extra: { collection: "testCollection", actionTypes: "updateOne" },
|
extra: { collection: "testCollection", actionType: "updateOne" },
|
||||||
}
|
}
|
||||||
await config.integration.update(query)
|
await config.integration.update(query)
|
||||||
expect(config.integration.client.updateOne).toHaveBeenCalled()
|
expect(config.integration.client.updateOne).toHaveBeenCalled()
|
||||||
|
|
Loading…
Reference in New Issue