Fix register unit test
MODIFY
src/server/rest/service/security/UserSecurity.ts
src/server/rest/service/security/UserSecurity.ts
@@ -95,7 +95,7 @@ export default class UserSecurity {
const filteredRequest: HttpTagsRequest = {
Search: sanitize(request.Search),
UserID: sanitize(request.UserID),
- Issuer: UtilsSecurity.filterBoolean(request.Issuer),
+ Issuer: Utils.objectHasProperty(request, 'Issuer') ? UtilsSecurity.filterBoolean(request.Issuer) : null
} as HttpTagsRequest;
UtilsSecurity.filterSkipAndLimit(request, filteredRequest);
UtilsSecurity.filterSort(request, filteredRequest);

MODIFY
test/api/AuthenticationTest.ts
test/api/AuthenticationTest.ts
@@ -74,15 +74,16 @@ describe('Authentication Service (tenant utall)', function() {
expect(response.status).to.be.eql(200);
expect(response.data).to.have.property('count', 1);
const user: User = response.data.result[0];
- testData.createdUsersAdminTenant.push(user);
+ response = await CentralServerService.defaultInstance.userApi.readTags({ UserID: user.id });
+ expect(response.status).to.be.eql(200);
+ expect(response.data).to.have.property('count', 1);
+ expect(response.data.result).to.have.lengthOf(1);
expect(user).to.have.property('email', newUser.email);
expect(user).to.have.property('name', newUser.name);
expect(user).to.have.property('firstName', newUser.firstName);
expect(user).to.have.property('status', 'P');
expect(user).to.have.property('role', 'B');
expect(user).to.have.property('locale', 'en_US');
- expect(user.tags).to.not.be.null;
- expect(user.tags).to.have.lengthOf(1);
expect(user.eulaAcceptedHash).to.not.be.null;
expect(user.eulaAcceptedOn).to.not.be.null;
expect(user.eulaAcceptedVersion).to.not.be.null;

Fix register unit test