From 40542b25449dc314062384c73eddc88bcd0e238c Mon Sep 17 00:00:00 2001 From: Kyriakos Barbounakis Date: Mon, 2 Dec 2019 09:42:44 +0200 Subject: [PATCH] update test for navigation properties --- modules/@themost/express/src/service.spec.js | 5 +++-- modules/@themost/express/src/test/db/local.db | Bin 872448 -> 872448 bytes 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/@themost/express/src/service.spec.js b/modules/@themost/express/src/service.spec.js index 485a655..5cbf0f8 100644 --- a/modules/@themost/express/src/service.spec.js +++ b/modules/@themost/express/src/service.spec.js @@ -298,7 +298,7 @@ describe('serviceRouter', () => { expect(response.body.value).toBeInstanceOf(Array); expect(response.body.value.length).toBe(1); const person = response.body.value[0]; - await request(app) + response = await request(app) .get(`/api/people/${person.id}/orders`) .set('Content-Type', 'application/json') .set('Accept', 'application/json'); @@ -306,7 +306,8 @@ describe('serviceRouter', () => { expect(response.body).toBeTruthy(); expect(response.body.value).toBeInstanceOf(Array); response.body.value.forEach( x => { - expect(x).toBeTruthy() + expect(x.additionalType).toBe('Order'); + expect(x).toBeTruthy(); }); }); diff --git a/modules/@themost/express/src/test/db/local.db b/modules/@themost/express/src/test/db/local.db index c7693a24901c21f1d1850e12233dc0d635e55e9b..4c455b7e37160f0b7ef8dc8f4719a91297863e79 100644 GIT binary patch delta 149 zcmZozVA`<2bb>VF+=(*IjB__86zVeyZ@#48p}{CTxj#a3b4kQjQJ{!c-hX~Z;byJ6 zcC9)_AZ7w$W*}w(Vpbq#17da{<^W<&Am##M?(JH2JlrhWMhXU&Rwjm4rj~k^CMMbj cMpgy}Mh1qKx`sx&2FQ|TrrQ&mcov)m0O=bm$^ZZW delta 149 zcmZozVA`<2bb>VF^ocUgjMFzJ6zVeyY`&!5p}{CHxj#a3b4kQjQJ{!c-hX~Zfo83` zcC9)_AZ7w$W*}w(Vpbq#17da{<^W<&Am##M?(JH2JlrhWh6;wpRtAPv#wL0uhNjvE cMpgy}Mh1qKx`sx&2FQ{oM%xpbcov)m0N4d9e*gdg