diff --git a/server/models/views/alerts-and-warnings.js b/server/models/views/alerts-and-warnings.js index 43d80386d..6ea733d2d 100644 --- a/server/models/views/alerts-and-warnings.js +++ b/server/models/views/alerts-and-warnings.js @@ -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 }) diff --git a/test/models/alerts-and-warnings.js b/test/models/alerts-and-warnings.js index ddd81c27f..37f378871 100644 --- a/test/models/alerts-and-warnings.js +++ b/test/models/alerts-and-warnings.js @@ -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') +})