Skip to content

Commit

Permalink
add 'getWarnings' to alerts and model warning
Browse files Browse the repository at this point in the history
includes appropriate journey click title
  • Loading branch information
Max Bladen-Clark committed Jul 3, 2023
1 parent 9b83dfb commit 7396537
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/models/views/alerts-and-warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ViewModel {
placeCentre: place ? place.center : [],
timestamp: Date.now(),
error: error ? true : null,
getWarnings: 'Alerts-and-warnings:Related-content:Get-warnings',
isEngland: place ? place.isEngland.is_england : null,
isDummyData: floods ? floods.isDummyData : false
})
Expand Down
8 changes: 8 additions & 0 deletions test/models/alerts-and-warnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,11 @@ lab.test('Test location sets page title', async () => {

Code.expect(Result.pageTitle).to.equal('Newcastle Upon Tyne - flood alerts and warnings')
})

lab.test('Test getWarnings has appropriate Value', async () => {
const options = {}

const Result = await new ViewModel(options)

Code.expect(Result.getWarnings).to.equal('Alerts-and-warnings:Related-content:Get-warnings')
})

0 comments on commit 7396537

Please sign in to comment.