Skip to content

Commit 76ff180

Browse files
committed
update integration tests
1 parent bcaf8b0 commit 76ff180

File tree

1 file changed

+34
-22
lines changed

1 file changed

+34
-22
lines changed

tests/integration/conversations.test.ts

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,12 @@ describe("Conversations", () => {
118118
// act
119119
const response = await client.conversations.reply({
120120
conversation_id: conversationId,
121-
message_type: "comment",
122-
type: "admin",
123-
body: "test",
124-
admin_id: adminId,
121+
body: {
122+
message_type: "comment",
123+
type: "admin",
124+
body: "test",
125+
admin_id: adminId,
126+
}
125127
});
126128

127129
// assert
@@ -132,10 +134,12 @@ describe("Conversations", () => {
132134
// act
133135
const response = await client.conversations.reply({
134136
conversation_id: conversationId,
135-
message_type: "comment",
136-
type: "user",
137-
body: "*click* Nice!",
138-
intercom_user_id: user.id,
137+
body: {
138+
message_type: "comment",
139+
type: "user",
140+
body: "*click* Nice!",
141+
intercom_user_id: user.id,
142+
}
139143
});
140144

141145
// assert
@@ -149,11 +153,13 @@ describe("Conversations", () => {
149153
// act
150154
const response = await client.conversations.manage({
151155
conversation_id: message.conversation_id,
152-
message_type: "assignment",
153-
type: "admin",
154-
admin_id: adminId,
155-
assignee_id: secondAdminId,
156-
body: "Goodbye :)",
156+
body: {
157+
message_type: "assignment",
158+
type: "admin",
159+
admin_id: adminId,
160+
assignee_id: secondAdminId,
161+
body: "Goodbye :)",
162+
}
157163
});
158164

159165
// assert
@@ -177,9 +183,11 @@ describe("Conversations", () => {
177183
// act
178184
const response = await client.conversations.manage({
179185
conversation_id: conversationId,
180-
message_type: "snoozed",
181-
admin_id: adminId,
182-
snoozed_until: new Date("2040.06.19").getTime() / 1000,
186+
body: {
187+
message_type: "snoozed",
188+
admin_id: adminId,
189+
snoozed_until: new Date("2040.06.19").getTime() / 1000,
190+
}
183191
});
184192

185193
// assert
@@ -190,8 +198,10 @@ describe("Conversations", () => {
190198
// act
191199
const response = await client.conversations.manage({
192200
conversation_id: conversationId,
193-
message_type: "open",
194-
admin_id: adminId,
201+
body: {
202+
message_type: "open",
203+
admin_id: adminId,
204+
}
195205
});
196206

197207
// assert
@@ -243,10 +253,12 @@ describe("Conversations", () => {
243253
// act
244254
const response = await client.conversations.manage({
245255
conversation_id: conversationId,
246-
type: "admin",
247-
message_type: "close",
248-
admin_id: adminId,
249-
body: "Hasta la vista, baby",
256+
body: {
257+
type: "admin",
258+
message_type: "close",
259+
admin_id: adminId,
260+
body: "Hasta la vista, baby",
261+
}
250262
});
251263

252264
// assert

0 commit comments

Comments
 (0)