|
|
@@ -38,6 +38,13 @@ describe('Resolving a thread', async function () {
|
|
|
const resolvedAt = new Date(threads[threadId].resolved_at)
|
|
|
expect(new Date() - resolvedAt).to.be.below(1000)
|
|
|
})
|
|
|
+
|
|
|
+ it('should list the thread id in the resolved thread ids endpoint', async function () {
|
|
|
+ const { response, body } =
|
|
|
+ await ChatClient.getResolvedThreadIds(projectId)
|
|
|
+ expect(response.statusCode).to.equal(200)
|
|
|
+ expect(body.resolvedThreadIds).to.include(threadId)
|
|
|
+ })
|
|
|
})
|
|
|
|
|
|
describe('when a thread is not resolved', async function () {
|
|
|
@@ -58,6 +65,13 @@ describe('Resolving a thread', async function () {
|
|
|
expect(response.statusCode).to.equal(200)
|
|
|
expect(threads[threadId].resolved).to.be.undefined
|
|
|
})
|
|
|
+
|
|
|
+ it('should not list the thread in the resolved thread ids endpoint', async function () {
|
|
|
+ const { response, body } =
|
|
|
+ await ChatClient.getResolvedThreadIds(projectId)
|
|
|
+ expect(response.statusCode).to.equal(200)
|
|
|
+ expect(body.resolvedThreadIds).not.to.include(threadId)
|
|
|
+ })
|
|
|
})
|
|
|
|
|
|
describe('when a thread is resolved then reopened', async function () {
|
|
|
@@ -89,5 +103,12 @@ describe('Resolving a thread', async function () {
|
|
|
expect(response.statusCode).to.equal(200)
|
|
|
expect(threads[threadId].resolved).to.be.undefined
|
|
|
})
|
|
|
+
|
|
|
+ it('should not list the thread in the resolved thread ids endpoint', async function () {
|
|
|
+ const { response, body } =
|
|
|
+ await ChatClient.getResolvedThreadIds(projectId)
|
|
|
+ expect(response.statusCode).to.equal(200)
|
|
|
+ expect(body.resolvedThreadIds).not.to.include(threadId)
|
|
|
+ })
|
|
|
})
|
|
|
})
|