fix database initialization

This commit is contained in:
Namekuji 2023-04-20 22:03:49 -04:00
parent 55f9112eed
commit bbb79bc46a

View file

@ -291,7 +291,7 @@ describe('Endpoints', () => {
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const connection = await initTestDb(false); const connection = await initTestDb(true);
const Users = connection.getRepository(User); const Users = connection.getRepository(User);
const newBob = await Users.findOneByOrFail({ id: bob.id }); const newBob = await Users.findOneByOrFail({ id: bob.id });
assert.strictEqual(newBob.followersCount, 0); assert.strictEqual(newBob.followersCount, 0);
@ -353,7 +353,7 @@ describe('Endpoints', () => {
assert.strictEqual(res.status, 200); assert.strictEqual(res.status, 200);
const connection = await initTestDb(false); const connection = await initTestDb(true);
const Users = connection.getRepository(User); const Users = connection.getRepository(User);
const newBob = await Users.findOneByOrFail({ id: bob.id }); const newBob = await Users.findOneByOrFail({ id: bob.id });
assert.strictEqual(newBob.followersCount, 0); assert.strictEqual(newBob.followersCount, 0);