Make test more robust against future model changes

Compare subset of JSON, not full JSON.
This commit is contained in:
Christian Georgi
2023-04-11 15:35:04 +02:00
parent a560e12106
commit 2a1a7b1f2b

View File

@@ -31,7 +31,7 @@ describe('Bookshop: OData Protocol Level Testing', () => {
.expect('Content-Type', /^application\/json/)
.expect(200)
expect(response.body.value).toEqual([
expect(response.body.value).toMatchObject([
{
ID: 201, title: "Sturmhöhe", author: "Emily Brontë",
currency: { name: "Pfund", descr: "Britische Pfund", code: "GBP", symbol: "£" }