fixed user test
MODIFY
test/api/UserTest.ts
test/api/UserTest.ts
@@ -9,6 +9,7 @@ import Factory from '../factories/Factory';
import { HTTPError } from '../../src/types/HTTPError';
import { ServerRoute } from '../../src/types/Server';
import SiteContext from './context/SiteContext';
+import { StartTransactionErrorCode } from '../../src/types/Transaction';
import { StatusCodes } from 'http-status-codes';
import Tag from '../../src/types/Tag';
import TenantContext from './context/TenantContext';
@@ -278,7 +279,8 @@ describe('User', function() {
expect(response.status).to.be.eq(StatusCodes.OK);
expect(response.data.tag.id).to.be.eq(testData.newTag.id);
expect(response.data.car).to.be.undefined;
- expect(response.data.errorCodes).to.be.empty;
+ expect(response.data.errorCodes).to.be.not.null;
+ expect(response.data.errorCodes[0]).to.be.eq(StartTransactionErrorCode.EULA_NOT_ACCEPTED);
});
it('Should be able to delete the created user', async () => {

fixed user test