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') })