diff --git a/packages/api/test/resolvers/labels.test.ts b/packages/api/test/resolvers/labels.test.ts index 352791922..1eef77366 100644 --- a/packages/api/test/resolvers/labels.test.ts +++ b/packages/api/test/resolvers/labels.test.ts @@ -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', ]) }) })