Skip to content

Commit a3b71ba

Browse files
committed
update notificaiton message
1 parent 87708c1 commit a3b71ba

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

football/src/main/scala/com/gu/mobile/notifications/football/notificationbuilders/MatchStatusNotificationBuilder.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ class MatchStatusNotificationBuilder(mapiHost: String) {
178178
|${dismissal.playerName} (${dismissal.team.name}) ${dismissal.minute}min$extraInfo""".stripMargin
179179
}
180180

181-
182181
triggeringEvent match {
183182
case g: Goal => goalMsg(g)
184183
case dismissal: Dismissal => dismissalMsg(dismissal)
184+
case prematch: PreMatch => s"""${homeTeamName} v ${awayTeamName}"""
185185
case _ => s"""${homeTeamName} ${score.home}-${score.away} ${awayTeamName} ($matchStatus)"""
186186
}
187187
}
@@ -193,8 +193,8 @@ class MatchStatusNotificationBuilder(mapiHost: String) {
193193
case SecondHalf(_) => "Second-half start"
194194
case FullTime(_) => "Full-Time"
195195
case _:Dismissal => "Red card"
196-
case _:PenaltyShootoutKick => "Penalty Kick" // needed for spec. We are filtering these out in the EventConsumer for now.
197-
case _:PreMatch => "Kick-off starting soon"
196+
case _:PenaltyShootoutKick => "Penalty Kick"
197+
case _:PreMatch => "Kick off starting soon"
198198
case _ => "The Guardian"
199199
}
200200

football/src/test/scala/com/gu/mobile/notifications/football/notificationbuilders/MatchStatusNotificationBuilderSpec.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,11 @@ class MatchStatusNotificationBuilderSpec extends Specification {
131131
notification must not(beAnInstanceOf[FootballPenaltyShootoutPayload])
132132
}
133133

134-
"Use 'Kick-off starting soon' as title for a pre-match event" in new MatchEventsContext {
134+
"Use 'Kick-off starting soon' as title and message for a pre-match event" in new MatchEventsContext {
135135
val preMatch = PreMatch("pre-match-event-id")
136136
val notification = builder.build(preMatch, matchInfo, List.empty, None).asInstanceOf[FootballMatchStatusPayload]
137137
notification.title shouldEqual Some("Kick-off starting soon")
138+
notification.message shouldEqual Some("Liverpool v Plymouth\nKick-off starting soon")
138139
}
139140
}
140141

0 commit comments

Comments
 (0)