Skip to content

Commit

Permalink
With the upgrade, the format of the next draw date JSON has changed f…
Browse files Browse the repository at this point in the history
…rom just a string date to the format shown in the test.
  • Loading branch information
wrandall22 committed Aug 22, 2023
1 parent 8d5c7b8 commit 5b021ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/common/services/api/common.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class Common {
path: ['nextdrawdate'],
cache: true
})
.pluck('next-draw-date')
.pluck('next-draw-date', 'string')
}
}

Expand Down
6 changes: 5 additions & 1 deletion src/common/services/api/common.service.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
})
Expand Down

0 comments on commit 5b021ed

Please sign in to comment.