fix tests

This commit is contained in:
Hongbo Wu
2024-06-28 11:56:28 +08:00
parent a3ba8573b7
commit 8bc05dad03

View File

@ -452,9 +452,9 @@ describe('Labels API', () => {
labelIds = [labels[0].id, labels[1].id]
})
it('should return error code BAD_REQUEST', async () => {
it('should return error code UNAUTHORIZED', async () => {
const res = await graphqlRequest(query, authToken).expect(200)
expect(res.body.data.setLabels.errorCodes).to.eql(['BAD_REQUEST'])
expect(res.body.data.setLabels.errorCodes).to.eql(['UNAUTHORIZED'])
})
})
@ -670,14 +670,14 @@ describe('Labels API', () => {
context('when highlight not exist', () => {
before(() => {
highlightId = 'fake_highlight_id'
highlightId = generateFakeUuid()
labelIds = [labels[0].id, labels[1].id]
})
it('should return error code BAD_REQUEST', async () => {
it('should return error code UNAUTHORIZED', async () => {
const res = await graphqlRequest(query, authToken).expect(200)
expect(res.body.data.setLabelsForHighlight.errorCodes).to.eql([
'BAD_REQUEST',
'UNAUTHORIZED',
])
})
})