From 1d1937a93e5f5d625757cbddaeca6b4599e5bd22 Mon Sep 17 00:00:00 2001 From: Nick Evans <2616208+nickevansuk@users.noreply.github.com> Date: Wed, 2 Aug 2023 08:55:34 +0100 Subject: [PATCH] fix: Certificate generation for custom built system (#549) --- .../test/certification/certification-writer.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/openactive-integration-tests/test/certification/certification-writer.js b/packages/openactive-integration-tests/test/certification/certification-writer.js index 9c7a0653c7..c3fb642ee3 100644 --- a/packages/openactive-integration-tests/test/certification/certification-writer.js +++ b/packages/openactive-integration-tests/test/certification/certification-writer.js @@ -61,11 +61,16 @@ class CertificationWriter { get awardedTo() { if (this.datasetJson) { - return this.datasetJson.bookingService || this.datasetJson.publisher && { + return this.datasetJson.bookingService?.name ? { + '@type': 'Organization', + name: this.datasetJson.bookingService.name, + url: this.datasetJson.bookingService.url, + softwareVersion: this.datasetJson.bookingService.softwareVersion, + } : (this.datasetJson.publisher && { '@type': 'Organization', name: this.datasetJson.publisher.name, url: this.datasetJson.publisher.url, - }; + }); } return {}; }