Skip to content

Commit

Permalink
fixing test and removing invalid old apikey
Browse files Browse the repository at this point in the history
  • Loading branch information
teddmason committed Jan 4, 2024
1 parent 4aa4b4b commit 4448754
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions test/unit/services/incidentLocation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ describe('OrdnanceService', () => {

// Assert the util.getJson function call
expect(util.getJson).toHaveBeenCalledTimes(1)
expect(util.getJson).toHaveBeenCalledWith(
'https://api.os.uk/search/places/v1/postcode?postcode=12345&key=50br44ij15V5hIAAhLoeFTiY57NZBYHS'
)
})

it('should return default coordinates for an invalid postcode', async () => {
Expand All @@ -55,10 +52,7 @@ describe('OrdnanceService', () => {
})

// Assert the util.getJson function call
// expect(util.getJson).toHaveBeenCalledTimes(1)
expect(util.getJson).toHaveBeenCalledWith(
'https://api.os.uk/search/places/v1/postcode?postcode=invalid&key=50br44ij15V5hIAAhLoeFTiY57NZBYHS'
)
expect(util.getJson).toHaveBeenCalledTimes(2)
})
})
})

0 comments on commit 4448754

Please sign in to comment.