test(gateway): align outbound session assertion shape

This commit is contained in:
Peter Steinberger
2026-02-26 22:14:23 +01:00
parent 2ed9d633b3
commit df65ed7e9e
2 changed files with 17 additions and 5 deletions

View File

@@ -392,7 +392,10 @@ describe("gateway send mirroring", () => {
expect(mocks.deliverOutboundPayloads).toHaveBeenCalledWith(
expect.objectContaining({
agentId: "work",
session: expect.objectContaining({
agentId: "work",
key: "agent:work:slack:channel:resolved",
}),
mirror: expect.objectContaining({
sessionKey: "agent:work:slack:channel:resolved",
agentId: "work",
@@ -414,7 +417,10 @@ describe("gateway send mirroring", () => {
expect(mocks.deliverOutboundPayloads).toHaveBeenCalledWith(
expect.objectContaining({
agentId: "work",
session: expect.objectContaining({
agentId: "work",
key: "agent:work:slack:channel:c1",
}),
mirror: expect.objectContaining({
sessionKey: "agent:work:slack:channel:c1",
agentId: "work",
@@ -437,7 +443,10 @@ describe("gateway send mirroring", () => {
expect(mocks.deliverOutboundPayloads).toHaveBeenCalledWith(
expect.objectContaining({
agentId: "work",
session: expect.objectContaining({
agentId: "work",
key: "agent:main:slack:channel:c1",
}),
mirror: expect.objectContaining({
sessionKey: "agent:main:slack:channel:c1",
agentId: "work",
@@ -460,7 +469,10 @@ describe("gateway send mirroring", () => {
expect(mocks.deliverOutboundPayloads).toHaveBeenCalledWith(
expect.objectContaining({
agentId: "work",
session: expect.objectContaining({
agentId: "work",
key: "agent:work:slack:channel:c1",
}),
mirror: expect.objectContaining({
sessionKey: "agent:work:slack:channel:c1",
agentId: "work",

View File

@@ -63,7 +63,7 @@ describe("sendMessage", () => {
expect(mocks.deliverOutboundPayloads).toHaveBeenCalledWith(
expect.objectContaining({
agentId: "work",
session: expect.objectContaining({ agentId: "work" }),
channel: "telegram",
to: "123456",
}),