feat: Improve error msg when attempting to redeem the same activation code multiple times (no-changelog) (#7355)

This commit is contained in:
Cornelius Suermann
2023-10-05 17:08:30 +02:00
committed by GitHub
parent cd12a5990a
commit f4d8c9eed5
2 changed files with 6 additions and 2 deletions

View File

@@ -63,13 +63,13 @@ describe('POST /license/activate', () => {
test('errors out properly', async () => {
License.prototype.activate = jest.fn().mockImplementation(() => {
throw new Error(ACTIVATION_FAILED_MESSAGE);
throw new Error('some fake error');
});
await authOwnerAgent
.post('/license/activate')
.send({ activationKey: 'abcde' })
.expect(400, { code: 400, message: ACTIVATION_FAILED_MESSAGE });
.expect(400, { code: 400, message: `${ACTIVATION_FAILED_MESSAGE}: some fake error` });
});
});