From 5b021edad3d98a6bb2f9337bce27c8a5d3cc0527 Mon Sep 17 00:00:00 2001 From: Bill Randall Date: Tue, 22 Aug 2023 17:22:37 -0400 Subject: [PATCH] With the upgrade, the format of the next draw date JSON has changed from just a string date to the format shown in the test. --- src/common/services/api/common.service.js | 2 +- src/common/services/api/common.service.spec.js | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/services/api/common.service.js b/src/common/services/api/common.service.js index ae5150a28..e80ac1b5f 100644 --- a/src/common/services/api/common.service.js +++ b/src/common/services/api/common.service.js @@ -16,7 +16,7 @@ class Common { path: ['nextdrawdate'], cache: true }) - .pluck('next-draw-date') + .pluck('next-draw-date', 'string') } } diff --git a/src/common/services/api/common.service.spec.js b/src/common/services/api/common.service.spec.js index 705689bab..3c5e761d2 100644 --- a/src/common/services/api/common.service.spec.js +++ b/src/common/services/api/common.service.spec.js @@ -20,7 +20,11 @@ describe('common service', () => { describe('getNextDrawDate', () => { it('should get next draw date', () => { self.$httpBackend.expectGET('https://give-stage2.cru.org/cortex/nextdrawdate') - .respond(200, { 'next-draw-date': '2016-10-01' }) + .respond(200, { 'next-draw-date': { + chars: '2016-10-01', + string: '2016-10-01', + valueType: 'STRING' + } }) self.commonService.getNextDrawDate().subscribe(date => { expect(date).toEqual('2016-10-01') })