mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-26 06:37:33 +00:00
test(server): pass numeric row ids to controllers and seed addons with booleans
Controllers read their path ids through the rowId pipe now, so unit tests that call a handler directly pass the number the pipe hands it. The e2e suites enable addons with true, the type of the entity's field. The realtime gateway test builds its book sockets through one helper instead of a second hand-built TripAccessService.
This commit is contained in:
@@ -71,7 +71,7 @@ function not400(got: Answer[], error: string): Answer[] {
|
||||
beforeAll(async () => {
|
||||
app = await buildApp();
|
||||
orm = app.get(MikroORM);
|
||||
await updateRows(orm, Addons, {}, { enabled: 1 });
|
||||
await updateRows(orm, Addons, {}, { enabled: true });
|
||||
}, 60_000);
|
||||
|
||||
afterAll(async () => {
|
||||
|
||||
@@ -223,7 +223,7 @@ describe('ROUTEID: every route answers a malformed path id like an unknown one',
|
||||
orm = app.get(MikroORM);
|
||||
await app.listen(0, '127.0.0.1');
|
||||
baseUrl = `http://127.0.0.1:${(app.getHttpServer().address() as AddressInfo).port}`;
|
||||
await updateRows(orm, Addons, {}, { enabled: 1 });
|
||||
await updateRows(orm, Addons, {}, { enabled: true });
|
||||
|
||||
const { user: admin } = await makeAdmin(orm);
|
||||
const { user: other } = await makeUser(orm);
|
||||
|
||||
Reference in New Issue
Block a user