test: Enhance owner completion test (#3175)

This commit is contained in:
Ben Hesseldieck 2022-05-19 17:57:23 +02:00 committed by GitHub
parent 8cb58bcbdc
commit a0b5ad357b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,8 +30,6 @@ beforeAll(async () => {
}); });
beforeEach(async () => { beforeEach(async () => {
jest.mock('../../config');
config.set('userManagement.isInstanceOwnerSetUp', false); config.set('userManagement.isInstanceOwnerSetUp', false);
}); });
@ -111,6 +109,7 @@ test('POST /owner should create owner with lowercased email', async () => {
const { id, email } = response.body.data; const { id, email } = response.body.data;
expect(id).toBe(ownerShell.id);
expect(email).toBe(newOwnerData.email.toLowerCase()); expect(email).toBe(newOwnerData.email.toLowerCase());
const storedOwner = await Db.collections.User.findOneOrFail(id); const storedOwner = await Db.collections.User.findOneOrFail(id);